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\
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.
Upgrade Storage
The latest version of the script is here : https://raw.github.com/mronkko/ZoteroCleanOrphans/master/ZoteroCleanOrphanedFiles.pl
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