0

I have very specific problem which I can't resolve. Thing is, I've created few files with function that creates temporary files and then system cron after running should delete them. Problem that I have is that I have manually deleted (temporary) file named "user-upload" and then created folder which has exact same name. Now when system cron runs it gives me two errors:

Could not delete temporary file "public:///user-upload" during garbage collection public:///user-upload is a directory and cannot be removed using file_unmanaged_delete().

I think I should somehow clear something in database but not exactly sure where to look at. Running drush cc all isn't helping in this case.

Thank you


EDIT: Eh, it takes you to ask question so you can get better idea. For the reference, solving this issue is locating particular file under database table "file_managed" column "filename" and then manually deleting it. Maybe it will help someone...

1
  • Glad you figured it out - you should include that as an answer, and then accept that answer so it doesn't continue to show as an unanswered question
    – Geoff
    Jul 12, 2014 at 16:45

3 Answers 3

1

For the reference, solving this issue is locating particular file under database table "file_managed" column "filename" and then manually deleting it.

3
0

As a small workaround for this issue added as a module in drupal.org here

Enable and configure it in admin->configuration->Development->logging and errors

https://www.drupal.org/project/skip_temp_file_warnings

0

Since playing with DB is not a good practice for basic users,as @Vladan mentioned:

  1. Open your database from phpmyadmin
  2. under database table "file_managed"
  3. Check the box near every file with status = 0
  4. Delete all files at once.
  5. Run cron again

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.