Skip to content

fix: keep the open file unchanged when its store entry is renamed - #4303

Merged
JammingBen merged 1 commit into
mainfrom
fix/app-wrapper-store-resource-copy
Nov 5, 2026
Merged

JammingBen merged 1 commit into
mainfrom
fix/app-wrapper-store-resource-copy

Conversation

@JammingBen

Copy link
Copy Markdown
Member

Description

AppWrapper put its own resource object into the resources store. Before the first save, a rename therefore changed the open file in place, including its extension. The text editor then serialized the content in a different format. For md -> txt this failed silently, so edits made after the rename were lost and closing the editor did not ask about unsaved changes.

  • The store now gets a copy of the loaded resource. After a rename to another extension, saving fails with the usual conflict error, so the user can still copy the content or use "Save As".
  • The top bar file actions (favorite, hide, sync, ...) read the store entry, so they still see updates made by those actions.
  • A save without a server response only updates the etag of the store entry, instead of overwriting its newer fields with the loaded resource.

Related Issue

@JammingBen JammingBen self-assigned this Nov 5, 2026
@JammingBen
JammingBen marked this pull request as ready for review November 5, 2026 13:33
@JammingBen
JammingBen merged commit 38c5031 into main Nov 5, 2026
29 checks passed
@JammingBen
JammingBen deleted the fix/app-wrapper-store-resource-copy branch November 5, 2026 13:46
@openclouders openclouders mentioned this pull request Nov 5, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsaved text editor changes are lost or corrupted when the open file is renamed to another extension

2 participants