I'm thinking it's this module but I also am using fscashe, filemanager, and filestore2. I deleted 2 files I uploaded because I noticed they went to a different directory than everything else yet the directory hadn't reached it's limit. I think I may of ended up loading the file twice but it only showed the second. Anyways I delete the files using the edit page. I look later and find on the server the files are still there. I double check the sql and find their are bits noting the files in 2 spots. I remove those entries. I still run into a problem with it now saying the file is in /files/active// it has the // on the end with no number. So I renamed the files and uploaded them and they went where they were supposed to (/files/active/0).

I think I saw somewhere else that Drupal is keeping deleted nodes also in the sql somewhere. I don't suppose there is a bug fix for that that can be applied here or overall if it's more than one area of Drupal effected by the bug.

CommentFileSizeAuthor
#2 attachment_delete_node.patch519 bytesZed Pobre
#1 attachment_2.patch500 bytestostinni

Comments

tostinni’s picture

StatusFileSize
new500 bytes

I check this problem of files staying on the server and came to this conclusion :
If during the edition of a node you delete an attachment and then you submit the node, there is no problem, files are well deleted from the server (NB: files are only deleted when node is submitted).

But when you delete the entire node, files are not deleted, because there is a wrong call in attachment_nodeapi.

This patch correct this.

Zed Pobre’s picture

StatusFileSize
new519 bytes

When attempting to apply that patch, I got a strange warning message:

(Stripping trailing CRs from patch.)
patching file attachment.module
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 59 with fuzz 1.

It seems to have applied correctly, but I'm submitting a fresh patch (with no content changes) that may correct this oddity.

tostinni’s picture

I think this is due to the fact I made the patch on a windows machine, and I may have forgeted to change the format.

Does it works fine for you ?

ccourtne’s picture

Status: Needs review » Fixed

Patch applied thanks!

ccourtne’s picture

Status: Fixed » Closed (fixed)