* claim: #5467 * Warn when a design is open elsewhere or changed on disk (#5467) The desktop app keeps a lock file next to each open design (.~<file>.lock: computer, user, version, opened and refreshed times), refreshes it every minute and removes it on close; a lock not refreshed for three minutes is stale and ignored. Opening a design that another SolidCraft has open asks: Open Read-Only, Open Anyway or Cancel. A read-only design saves only to another file. A design remembers its file's size and modification time when it is opened or saved. Save over a file another program or computer changed since asks: Save a Copy (the default), Overwrite or Cancel. Programmatic calls never ask: doc.open reports open_elsewhere and takes read_only, and file.save over a changed file returns an error until it is given overwrite: true. ui.documents answers both questions.
42 lines
1.4 KiB
TOML
42 lines
1.4 KiB
TOML
[package]
|
|
name = "solidcraft-io"
|
|
description = "SolidCraft file formats: designs (JSON), STL, OBJ, STEP, IGES, 3MF and glTF, and FreeCAD/Rhino import"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
# Tests only: trust a model cache even when the build has no git commit.
|
|
trust-unknown-source = []
|
|
|
|
[dependencies]
|
|
solidcraft-geom = { workspace = true }
|
|
solidcraft-kernel = { workspace = true }
|
|
solidcraft-doc = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
log = { workspace = true }
|
|
zip = { workspace = true }
|
|
quick-xml = { workspace = true }
|
|
gltf = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true, features = ["raw_value"] }
|
|
sha2 = { workspace = true }
|
|
chardetng = { workspace = true }
|
|
encoding_rs = { workspace = true }
|
|
# FreeCAD and Rhino import (pure Rust, so the browser build has it too).
|
|
cadmpeg-core = { workspace = true }
|
|
cadmpeg-ir = { workspace = true }
|
|
cadmpeg-registry = { workspace = true }
|
|
|
|
# A plain fsync where a network share refuses Apple's full flush (src/safe_write.rs); already in
|
|
# the tree through tempfile.
|
|
[target.'cfg(target_vendor = "apple")'.dependencies]
|
|
rustix = { version = "1", default-features = false, features = ["std", "fs"] }
|
|
|
|
# The computer's name for a design's lock file (src/design_lock.rs; the browser keeps no lock files).
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
gethostname = { workspace = true }
|