Locked Files (*.rtf) - can't edit files in DT3

DVT3 is locking my files, especially my rtf-files. I can’t edit them in dvt3, I have to open them in Nisus Writer. It has nothing to do with automatic rules (fies are new, I never apply the rule). Files are marked in the editor with the little “sword? crossed pencil? - symbol”, but not with the padlock. In the context menu (right click with the mouse) the files are not marked as protected - so I can’t unlock them.

When I create a new file everything is fine. When I come back later the file is locked.

I read this:

but there was no solution.

Any ideas? Thanks

This is actually intentional in case of RTF files created/edited with Nisus Writer as this app uses its own proprietary RTF extensions and the text engine of macOS might corrupt the layout of your document or remove images.

aha. So basically I have two different RTF-files:

The ones I created or edited with Nisus Writer - these files can’t be edited in DT3 and can’t be saved after opened in DT3 and edited in TextEdit. And vice versa. Better to avoid Nisus Writer then, because it kills the workflow. Thanks for the quick reply.

I switched to markdown and I have the same problem when editing the *.md-file with an external Editor (Typora). The files I edited in Typora are locked in DT3 - why? When I reopen them in Typora I can’t save them anymore. I have to save a copy. This can’t be a feature.

Are you looking at the Preview mode in DEVONthink?
If so, choose View > Document Display > Source if you want to edit the file.

A screen capture may be helpful.

Thanks for your answer. After some testing I think the problem has something to do with my file system. Parts of my database are indexed files and folders located in a folder which is synchronized via “Google Drive File Stream” to a Google Cloud Drive. These files are on my hard drive (for offline use) but are uploaded in the background. When I create a file in DT3 in one of these folders I can edit them in DT3. But after editing them in an external editor I can’t save them anymore. So I think Google Drive is causing the trouble.

While I don’t use that app or service, I would say that is plausible.

I’m consistently running into a similar issue. I also use Typora as an external Markdown editor, and am (regularly) running into issues where files opened in Typora are suddenly reported (by Typora) as being locked. I’ve worked with the Typora support folks and they do not believe that Typora is at fault.

Weirdly, once Typora tells me that a file is locked, if I edit and save that file (in Source mode) in DEVONthink, then the “lock” magically disappears and Typora is happy again.

  • Are you indexing the files?
  • Is your sync set to Automatic in DEVONthink?

Hi Jim,

No, I’m not indexing the files. Yes, I had sync set to Automatic. I have since changed it to sync every 15 minutes, but am still running into the same locking issues (though slightly less frequently).

Once Markdown file/s are locked, even TextEdit cannot save the file. In fact, TextEdit cannot even open the file, as it tells me immediately that the file is locked. Thus, this doesn’t appear to be a Typora-related issue.

Things get even worse if I use an AppleScript SmartAction to update hyperlinks in the Markdown notes, which triggers the “locked file” issue fairly quickly.

Is this in your Global Inbox?

No, these are (typically) newly created notes in the inbox of my “Notebox” database. The lock issues occur, though, irrespective of whether the files are in the inbox of the Notebox database or not.

Where is the database located - the file path on the machine?

All of my DT databases are stored in ~/Databases (which is a local folder on the primary SSD… no funny Dropbox or other sync stuff going on, and no NAS, etc.).

As an aside (which may be a red herring): I’ve run into this issue on and off for many months now on my iMac (27” 5K, 2019), but it’s especially problematic on my 2022 M1 Max MacBook Pro. Not sure if that is in anyway relevant.

Did you check the permissions & ownership of the locked files?

Hi Jim,

Yes, that’s something I’ve done frequently from the time I first ran into this issue.

The screenshots below shows the permissions on the most recent note to get locked. Weirdly the file doesn’t show as locked, yet Typora / TextEdit / etc. all complain. Permissions look file (to my untrained eye :slight_smile:)


DEVONthink-Typora lock issue 3

What does the Terminal command xattr -l path report for such a file? Please note that you have to replace path with the actual path of such a file.

Below are the results of running xattr -l on the note in question:

com.apple.FinderInfo:
com.apple.ResourceFork:
com.apple.TextEncoding: utf-8;134217984
com.apple.lastuseddate#PS: �Z�b
com.apple.metadata:_kMDItemUserTags: bplist00�Vtech
0Wtopic
0Zresearch
0Ztechical

Interestingly, I just tried something I haven’t tried to date… When I try to save the file and Typora complains that it is locked, if I simply wait (for ~ 20 seconds in the recent “experiment”) then the lock is released and I can save.

  • Do you still see an issue with TextEdit?
  • Just to stretch a little further, does MacDown exhibit the same behavior?
  • Are you double-clicking the file to open it externally or using Open With from the Data or contextual menu?