Skip to content

[pull] main from CodeEditApp:main#35

Merged
pull[bot] merged 1 commit into
ais-developer:mainfrom
CodeEditApp:main
Jun 24, 2025
Merged

[pull] main from CodeEditApp:main#35
pull[bot] merged 1 commit into
ais-developer:mainfrom
CodeEditApp:main

Conversation

@pull

@pull pull Bot commented Jun 24, 2025

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

### Description

Fixes an issue where a file save would not correctly update the `CodeFileDocument`'s metadata when saving. This caused scheduled autosave operations to fail with a false positive 'changed by another application' error.

To fix, I'm allowing `NSDocument` to handle the actual file system operation, rather than writing the data like we were before. I've kept the extra logic in the overridden `save` method to fix broken directories. There's no good reason to move the file saving operation out of `NSDocument`, since that subclass likely handles it better than we do with an atomic data write.

I've also moved autosave scheduling out of UI and into the document class.

### Related Issues

* closes #2033

### Checklist

- [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md)
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code

### Screenshots

N/A
@pull pull Bot added the ⤵️ pull label Jun 24, 2025
@pull pull Bot merged commit 6619d16 into ais-developer:main Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant