Maybe this bug should be reported to drupal core instead. Twice it has deleted (!) all my images in the public folder... And I see a strange message in the "reports" list: The file public://galerie-13/0062-6f26189b9cea13d3bf043b2bd9abe557.jpeg was not deleted, because it does not exist

(User: anonymous, severity: notice)

I have created a directory-galerie and uploaded everything, everything looks fine.. The next day when I surf to the site all images has been deleted. The thumbs still exist and the db looks ok also, nothing deleted there. I'm using Drupal 7.12 with the standard installation theme.

Seems its this function in include/file.inc that tries to remove:

/**
* Delete a file without calling any hooks or making any changes to the
* database.
*
* This function should be used when the file to be deleted does not have an
* entry recorded in the files table.
*
* @param $path
* A string containing a file path or (streamwrapper) URI.
*
* @return
* TRUE for success or path does not exist, or FALSE in the event of an
* error.
*
* @see file_delete()
* @see file_unmanaged_delete_recursive()
*/
function file_unmanaged_delete($path) {..

I think its the file module that does this.. and its a very stupid behaviour..

Comments

SeeSchloss’s picture

Assigned: Unassigned » SeeSchloss

Hmm... it must have something to do with Drupal trying to manage files itself, maybe I have missed registration function for upload files or something... I'm looking into this this evening.

magnusnm’s picture

ok sounds great!

I was really surprised when everything disappeared.. :)

I think its a nice and easy to use module btw

SeeSchloss’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Status: Active » Fixed

OK I've found it, uploaded files were not marked as permanent (they seem to be marked as temporary by default). Since I had mostly tested with upload from remote sites which isn't affected, I had not noticed, sorry.

So, fixed in dev, and in next release which will be 1.3, hopefuly this week, maybe next week.

Thank you :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.