refactor(core): atomic file writes from proton-base-rs

Config, machine id and mount-failure files go through
proton_base_rs::atomic. Same modes as before (config 0600, the others
0644); the mount-failure file is now synced before its rename.
This commit is contained in:
nvrl committed 2026-11-20 12:16:32 +01:00
1 parent 26272cda6c
commit 233d9e9e51
6 files changed
+27 -39

No files matched your search

Generated
+18 -7
View File
@@ -1476,7 +1476,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -1931,7 +1931,7 @@ dependencies = [
"gobject-sys",
"libc",
"system-deps 9.0.1",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -3633,6 +3633,7 @@ dependencies = [
"libc",
"parking_lot 0.13.0",
"proton-auth-rs",
"proton-base-rs",
"proton-drive-rs",
"proton-gallery-rs",
"proton-sdk",
@@ -3938,6 +3939,16 @@ dependencies = [
"zeroize",
]
[[package]]
name = "proton-base-rs"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "451151bb1025ea5cb362f69e2bfb2d45afed603e5c6daa3dc752333a7c29c878"
dependencies = [
"rusqlite",
"thiserror 2.0.21",
]
[[package]]
name = "proton-drive-rs"
version = "0.12.1"
@@ -4155,7 +4166,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -4610,7 +4621,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -4667,7 +4678,7 @@ dependencies = [
"security-framework",
"security-framework-sys",
"webpki-root-certs",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -5175,7 +5186,7 @@ dependencies = [
"getrandom 0.4.3",
"once_cell",
"rustix",
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]
@@ -5840,7 +5851,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.52.0",
"windows-sys 0.61.2",
]
[[package]]