"Update Indexed Items" removes missing files without reporting in logs


I noticed a particular behavior of “Update Indexed Items” and cannot tell if it’s a bug or a (confusing to me) intentional design.

Here’s what I did: I have some PDFs stored in Zotero, and indexed those PDFs individually into DT. When I rename them from Zotero’s UI (and consequently the files stored in the file system), DT naturally won’t be able to locate the renamed files. So I manually selected the Database those files belong in and used File → Update Indexed Items.

I expected DT to report the missing files in the logs and I could swear I’ve seen DT done this before. But instead, DT just quietly removed the missing items from the database. All I could see was the item count in the parent group went down by one, without anything in the logs or the Trash group.

My question is: is this a bug or an intentional behavior? How can I make sure DT doesn’t remove missing indexed files without reporting in the logs?

Thank you in advance.

This is intentional.

File > Verify & Repair Database… reports missing items indeed in the log.

1 Like

Thanks for the clarification, Christian!

I found this intentional design confusing because I feel nervous I might rename an indexed file in another app (Finder, Zotero, etc.) and DT just quietly removes the missing files without notifying me. What should I do to avoid such an undesired scenario? Should I always make sure to run Fire > Verify & Repair Database and check the logs before running File > Update Indexed Items?

Usually the indexed items located in indexed folders are automatically updated e.g. after renaming if the filesystem supports filesystem events (e.g. not always supported in case of network volumes).

In my case, the files are store on my internal SSD under ~/Zotero/storage but DT doesn’t seem to be able to recognize the renamed files. Why is it so and how should I fix it, if possible?

Did you index files or complete folders?

I index every PDF individually and manually, by dragging each PDF into DT while holding ⌥⌘.

In that case the automatic update of indexed items isn’t supported. Since version 3.8 the path of such items can be changed via the Info inspector (see Path popup menu).

Thank you for the clarification! I did notice the Path popup menu, but I’m having trouble using it as well. When I click the Path menu of a missing indexed item, all the files (folders not included) appear greyed out and thus cannot be selected as the new location. But if the indexed item is not missing, the files in the Path menu won’t be greyed out. What am I doing wrong here?

What’s the outdated/missing path and what’s current path of the file?

The files that brought my attention to the problem are stored under ~/Zotero/storage. I also tested just now with a file stored in ~/Downloads and had the same problem. In both cases, I renamed the files without moving the file to another location.

Just in case, I’m on macOS Monterey version 12.0 Beta (21A5543b), if it might be related.

I’m sorry but selecting renamed items is indeed not yet possible, only selecting moved items (same name & extension). The next release will support this. In the meantime one workaround might be to use a script to update the path.

1 Like

Thank you for walking me through this, Christian! Now I’ll just wait for the next release.