#23 √ wontfix
Adam Ingram-Goble

directories left after attachment deletion

Reported by Adam Ingram-Goble | July 17th, 2008 @ 02:51 PM

After deleting attachments, the files themselves are gone, but hierarchy that was created for them is not. For example:

/public/photos/1/original/foo.jpg

/public/photos/1/thumb/foo.jpg

/public/photos/2/original/joe.jpg

After deleting photo.id == 1 the filesystem should have only

/public/photos/2/original/joe.jpg

but right now has

/public/photos/1/original/

/public/photos/1/thumb/

/public/photos/2/original/joe.jpg

Since those directories no longer have a file in them and the associated record doesn't exist, it is good housekeeping to remove the cruft.

adam

Comments and changes to this ticket

  • Jon Yurek

    Jon Yurek August 13th, 2008 @ 05:50 PM

    • → State changed from “new” to “wontfix”
    • → Tag changed from “bug feature” to “delete feature filesystem storage”

    I debated this while I was writing it and again when this ticket came in. I don't think it's necessary for paperclip to get rid of the directories. They can be cleaned up easily enough outside the app if it's actually a requirement to have no empty directories.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket