Locked folders--bugs and potential data loss!

If you lock folders and drag aliases to DevonThink (Pro), you can (a) edit files that you shouldn’t be able to edit, and (b) destroy files. Be careful.

To replicate the bug:

  1. Create a folder, into that folder put an .rtf document and an .rtfd document. (Remember, .rtfd documents are folders with the “bundle bit” set).

  2. Lock the folder

  3. Command-option drag the folder to a DT database (ie, Index).

  4. In the three panel view, edit each file, and save.

  5. What I find (usually) is that I can save changes to the .rft document and the .rtfd document is destroyed upon “saving”!

One should not be able to save either document when it resides in a locked folder. I see this behavior if I either set the locked bit, or if I turn off write access of the folder for the user in the Finder “Get Info” box.

I don’t understand how DevonThink even gets the privileges to save in a locked folder, let alone why it destroys the files. Is it running as super-user?

thank you for the bug report! DEVONthink doesn’t have any special privileges, only the ones of the current user. However, the Finder locking is a very weak protection, e.g. even in the Finder files in subfolders of locked folders can be created/deleted/moved/modified/renamed.

But it’s kind of strange that Mac OS X claims that locked folders are writable (because DEVONthink already checks whether external/indexed files are writable of course). Anyway, we’ll add a workaround to v2.0.2.