Issue with emptying trash - orphaned attachments

When a file is in read-only mode and cannot be deleted (such as when pdf is open with another program), and the file gets deleted by emptying the trash, the program does not complain. It removes it from the database, and the file gets orphaned in Zotero\storage\
  • (but this sounds like a bug that should be fixed to me - I'm not sure anyone had figured out where those orphaned files come from in the first place, so that's good to know)
  • I'm not sure anyone had figured out where those orphaned files come from in the first place
    I don't follow. They are added to Zotero and they *become* orphans.
  • Right, but that shouldn't be possible. If you delete an item in Zotero it should delete the attached files. themeo points out the circumstances under which it doesn't do that - I at least didn't know how that happened.
  • I've encountered this issue in the past : it's when you've the PDF opened while deleting the ref in Zotero. On Windows (at least), you can't delete a file which is open. It is automatically locked.
  • First of all, Gracile thanks for sharing with the script. I guess when I have some spare time I will rewrite it into Python, and share it with you guys.

    Second, I remember there are some situations when Zotero does handle such situations nicely - it complains about a file being blocked - I think it is during the sycnhronization, when it tries to download a newer version of a file which is locked locally.


    Jakub
  • This might require reworking deletions a bit, but I've created a ticket for this.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.