Skip to content

"Revert" on external file change dialog reverts to open-time state instead of reloading from disk (SMB/network mount) #6525

@charlotte-parker-kiwazo

Description

Summary

When a file is modified externally while also having unsaved local changes, Typora shows a dialog with "Save" and "Revert Changes" options. Clicking "Revert Changes" appears to restore the buffer to the state when the file was first opened, rather than reloading the current file contents from disk.

This means both the local (unsaved) changes AND the external changes are lost.

Steps to reproduce

  1. Open a Markdown file over an SMB network mount in Typora
  2. Make some edits in Typora (do not save)
  3. Have another process modify and save the same file on the remote machine
  4. Typora detects the external change and shows the conflict dialog
  5. Click "Revert Changes"

Expected behavior

"Revert Changes" should reload the file from disk as it currently exists, showing the externally modified version.

Actual behavior

"Revert Changes" restores the file to the state it was in when first opened in Typora. Both the unsaved local edits and the external modifications are discarded.

Suggestion

An explicit "Reload from disk" option (or renaming "Revert Changes" to clarify its behavior) would help. Ideally the dialog could offer three choices:

  • Save — overwrite disk with Typora buffer
  • Reload from disk — discard local buffer, load current file from disk
  • Merge (optional) — show a diff

Environment

  • Typora on macOS
  • File accessed over SMB mount
  • External modifications made by a CLI process on the remote machine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions