дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
Saving wrote a temp file next to the file and renamed it over the original, so the saved file was a different file: another hard link kept the old text, and extended attributes (Finder tags, the quarantine flag), ACL entries, the group and the creation date were lost; a file made read-only with chmod 444 was overwritten, and a writable file whose ACL denies deleting could not be saved. An existing user file is now written in place (ide_vfs::save_file): a copy is made next to it first, written back if the write fails and removed after it succeeds; a read-only file is refused with a permission error. In a folder that allows no new file, the editor save writes in place without the copy while the notebook save (save_file_strict) refuses. New files and the IDE's own files are still written to a temp file and renamed. Editor, .properties, plugin and notebook saves use it. Co-authored-by: ntbang0901 <[email protected]>