added functionality to open shared files with you + fixed bug where mid transfer the SIGTERM signal can corrupt the mount

This commit is contained in:
nvrl committed 2026-07-20 22:30:16 +02:00
1 parent e0f0c7e0b7
commit bf625bf8d9
15 files changed
+1621 -136

No files matched your search

+9
View File
@@ -41,6 +41,13 @@ pub struct AppConfig {
/// defaults. Defaulted for configs predating the field.
#[serde(default)]
pub ignore_patterns: Option<Vec<String>>,
/// Device uid this machine has been *adopted* into, overriding the hostname
/// heuristic in `ensure_device`. Lives here rather than in `cache.db` so it
/// survives a fresh install — on a new machine the DB is empty by
/// definition, which is exactly when the pin matters. `None` means "resolve
/// by hostname". Defaulted for configs predating the field.
#[serde(default)]
pub device_uid: Option<String>,
}
impl Default for AppConfig {
@@ -51,6 +58,7 @@ impl Default for AppConfig {
cache_budget: None,
mountpoint: None,
ignore_patterns: None,
device_uid: None,
}
}
}
@@ -294,6 +302,7 @@ mod tests {
cache_budget: Some(1234),
mountpoint: Some("/tmp/x".to_string()),
ignore_patterns: Some(vec!["build/".to_string()]),
device_uid: Some("dev-uid".to_string()),
};
let json = serde_json::to_string(&config).unwrap();
let decoded: AppConfig = serde_json::from_str(&json).unwrap();