feat: add dual-layer versioning to WebDAV sync (protocol v2 + db-v6)

Separate protocol version from database compatibility version in WebDAV
sync paths. Upload writes to v2/db-v6/<profile>, download falls back to
legacy v2/<profile> when current path has no data. Extend manifest with
optional dbCompatVersion field and add legacy layout detection to UI.
This commit is contained in:
Jason
2026-03-08 19:33:20 +08:00
parent bf40b0138c
commit c0737f2cfe
8 changed files with 330 additions and 67 deletions
+3 -2
View File
@@ -477,7 +477,8 @@ mod tests {
"https://dav.example.com/remote.php/dav/files/demo/",
&[
"cc switch-sync".to_string(),
"v3".to_string(),
"v2".to_string(),
"db-v6".to_string(),
"default profile".to_string(),
"manifest.json".to_string(),
],
@@ -485,7 +486,7 @@ mod tests {
.unwrap();
assert_eq!(
url,
"https://dav.example.com/remote.php/dav/files/demo/cc%20switch-sync/v3/default%20profile/manifest.json"
"https://dav.example.com/remote.php/dav/files/demo/cc%20switch-sync/v2/db-v6/default%20profile/manifest.json"
);
assert!(!url.contains("//cc"), "should not have double-slash");
}