mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-02 20:18:38 -05:00
- A path written as a folder (`draft.svg/`, `draft.svg/.`) is refused instead of saving `draft.svg`. - The second check uses the name the file is stored under, so on a volume that ignores letter case a grant for `Report.svg` allows a save to `report.svg`. - Where the rename is refused, the copy of the old content is made beside the temporary file through the open folder, and in the system's temporary folder only when the folder takes no new file. - The copy of the old content is read from the file that is then overwritten: when another file is at the name by then, nothing is overwritten and the new content stays in the temporary file. - On Apple platforms the folder is opened with `O_SEARCH`, so a folder that can be written and searched but not listed takes the file. - On Linux the replaced file's ACL is read through an `O_PATH` handle, so a file its owner can write but not read keeps its ACL. - The moved-folder test expects the original folder in the message on FreeBSD, which does not report where an open folder is now.