Skip to content

[BUG] An open text document can't be overwritten #3838

Closed

Description

@mYnDstrEAm

I have a markdown file open in QOwnNotes then paste a newer version of that text file into the folder in the file explorer and overwrite the text document there. QOwnNotes asks in a window:

The current note was modified outside of this application!
Differences: [...]
Accept external changes? [Yes] [No]

There I press Yes.

Expected behaviour

It should load the text of the file (the new version, not the one that got overwritten).

Actual behaviour

It still shows the prior document despite pressing Yes in that dialog and seems to overwrite the file with the earlier version since that document is again the older version without manually saving.

This is probably related to #3366 And I'm not sure this "current note was modified outside of this application" dialog was shown the first time I overwrote the file which may be a separate problem.

Steps to reproduce

Steps to reproduce the behavior:

  1. In Debian 13 open a large markdown text document
  2. Overwrite the file in Dolphin file explorer
  3. Press Yes in the Accept external changes? dialog
  4. Try to overwrite the file in the file explorer again: it will show the document is back to the earlier version so again differs from the new version

Screenshots

Output from the debug section in the settings dialog

Expand

Relevant log output in the Log panel

Expand [21:09:55] [debug] notesWereModified - Modification date didn't change, continuing [21:09:55] [status] 🔄 Current note was modified externally [21:09:55] [debug] openNoteDiffDialog - 'changedNote': Note: 1 "documentname" "documentname.md" 0 "" false [21:09:58] [debug] storing note file: "documentname.md" [21:09:58] [debug] stored note: Note: 1 "documentname" "documentname.md" 0 "" false [21:09:58] [debug] storeUpdatedNotesToDisk - 'count': 1 [21:09:58] [status] 💾 Stored 1 note(s) to disk [21:10:00] [status] 🔄 Loading external changes from: documentname.md [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'path': "/home/fullpathhere/" [21:10:00] [debug] fileUrlInCurrentNoteFolderToRelativePath - 'canonicalFilePath': "/home/fullpathhere/" .... [21:10:01] [debug] updateNoteText: false [21:10:01] [debug] setCurrentNote - 'note': Note: 1 "documentname" "documentname.md" 0 "" false - 'updateNoteText': false - 'updateSelectedNote': true [21:10:01] [debug] added to history: NoteHistoryItem: "bikecamping" "" 96831 0.509729 [21:10:01] [debug] focusInEvent - Registering as active editor: QOwnNotesMarkdownTextEdit(0x559221072290, name="noteTextEdit") "noteTextEdit" [21:10:01] [debug] registerAsActiveEditor - Registering editor: QOwnNotesMarkdownTextEdit(0x559221072290, name="noteTextEdit") "noteTextEdit" [21:10:02] [debug] operator() - deferred re-index after external directory change [21:10:02] [debug] buildNotesIndex - 'noteSubFolderId': 0 [21:10:02] [debug] buildNotesIndex - 'files': QList("documentname.md", "document2name.md", "document3name.md") [21:10:02] [debug] buildNotesIndex - 'files': QList() [21:10:02] [debug] buildNotesIndex - 'noteSubFolderId': 1 [21:10:02] [debug] buildNotesIndex - 'files': QList("Home.txt") [21:10:02] [debug] buildNotesIndex - 'noteSubFolderId': 2 [21:10:02] [debug] buildNotesIndex - 'files': QList("Home.txt") [21:10:02] [debug] buildNotesIndex - 'noteSubFolderId': 3 [21:10:02] [debug] setupNoteFolderTables - 'database version': 16 [21:10:02] [debug] cloudConnection: CloudConnection: 0 "" "" "" "" 0 [21:10:02] [debug] ==================================================== [21:10:02] [debug] Note folder loading complete - Checksum statistics: [21:10:02] [debug] Total calculateChecksum() calls: 0 [21:10:02] [debug] Total time spent: 0 ms [21:10:02] [debug] ==================================================== [21:10:02] [debug] buildNotesIndex - 'noteSubFolderId': 0

Activity

  1. pbek commented on Nov 2, 2026

    @pbek
    Owner

    Can you please post the output from the debug settings that you can copy when you get to the settings dialog in QOwnNotes and head over to the Debug section of it?

  2. added a commit that references this issue on Nov 6, 2026
  3. pbek commented on Nov 6, 2026

    @pbek
    Owner

    Thank you for the report! With #3842 (thank you, @myukitty), the current note is no longer saved automatically while the "modified outside of this application" dialog is open. Before, autosave could write your old editor text over the new file while you were deciding. Then Reload from disk loaded that overwritten text instead of the external changes, which matches your log.

    This fix applies when the note checksum checks setting is turned off, which is the default.

    It will be in the next release (26.11.6). Can you please test it when it's out and let us know if the external version is now loaded after clicking Reload from disk?

    Some cases are still known to not be covered:

    • With note checksum checks turned on, the existing checksum conflict handling is unchanged.
    • If the file is replaced in a way that makes QOwnNotes rescan the whole note folder (e.g. some file managers or sync clients replace the file instead of writing into it), pending local edits may still be saved before the dialog shows up. This might also explain why you didn't see the dialog the first time.

    If you still run into the problem, please post the log output again, ideally with debug output enabled.

  4. added a commit that references this issue on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions