mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 19:41:36 -05:00
9d7d310e83
When the rename is refused, a checked save on Unix copied the new content into the existing file, opened with `O_CREAT` after a separate check that the file was there. A file removed between the check and the open was created again before the final check of the folder, so a folder moved out of the write root could be left holding an empty file. The existing file is now opened without `O_CREAT`; a missing one is created only after the final check, as before. The open is non-blocking and only a regular file is written, so a FIFO at the name fails at once. The rule that Linux's `fs.protected_regular` applied to the `O_CREAT` open is kept: in a sticky folder that the group or others can write to, a file owned by neither this user nor the folder's owner is refused.
31 lines
979 B
TOML
31 lines
979 B
TOML
[package]
|
|
name = "vectorcraft-format"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft native .vectorcraft format (versioned JSON, embedded images)"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-brush = { workspace = true }
|
|
craft-vectorcraft-format = { workspace = true }
|
|
craft-gzip = { workspace = true }
|
|
serde ={ workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
flate2 = { workspace = true }
|
|
|
|
# A plain fsync where a volume refuses the full flush (`sync_file`, atomic.rs), and the replaced
|
|
# file's access ACL on Linux (`keep_permissions`). Already in Cargo.lock (tempfile), so this adds
|
|
# no new crate.
|
|
[target.'cfg(unix)'.dependencies]
|
|
rustix = { workspace = true, features = ["std", "fs", "process"] }
|
|
|
|
[dev-dependencies]
|
|
vectorcraft-testkit = { workspace = true }
|
|
proptest = { workspace = true }
|
|
vectorcraft-geom = { workspace = true }
|