projects
/
rapid-gossip-sync-server
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b13e988
)
Correct v2 symlink paths
main
author
Matt Corallo
<git@bluematt.me>
Wed, 29 May 2024 14:54:57 +0000
(14:54 +0000)
committer
Matt Corallo
<git@bluematt.me>
Wed, 29 May 2024 14:54:57 +0000
(14:54 +0000)
src/snapshot.rs
patch
|
blob
|
history
diff --git
a/src/snapshot.rs
b/src/snapshot.rs
index 03c14adabff71223debc7beb925865abe5ce5cc9..896783efd3caf7c632eb2fa07f003216c6f838d3 100644
(file)
--- a/
src/snapshot.rs
+++ b/
src/snapshot.rs
@@
-92,8
+92,8
@@
impl<L: Deref + Clone> Snapshotter<L> where L::Target: Logger {
// channel updates
// purge and recreate the pending directories
// channel updates
// purge and recreate the pending directories
- let suffixes = [
"", "/v2"
];
- for
suffix
in suffixes {
+ let suffixes = [
("", ""), ("/v2", "../")
];
+ for
(suffix, _)
in suffixes {
let versioned_snapshot_directory = format!("{}{}", pending_snapshot_directory, suffix);
let versioned_symlink_directory = format!("{}{}", pending_symlink_directory, suffix);
let versioned_snapshot_directory = format!("{}{}", pending_snapshot_directory, suffix);
let versioned_symlink_directory = format!("{}{}", pending_symlink_directory, suffix);
@@
-185,9
+185,9
@@
impl<L: Deref + Clone> Snapshotter<L> where L::Target: Logger {
};
log_info!(self.logger, "i: {}, referenced scope: {}", i, referenced_scope);
};
log_info!(self.logger, "i: {}, referenced scope: {}", i, referenced_scope);
- for
suffix
in suffixes {
+ for
(suffix, path_to_root)
in suffixes {
let snapshot_filename = snapshot_filenames_by_scope.get(&referenced_scope).unwrap();
let snapshot_filename = snapshot_filenames_by_scope.get(&referenced_scope).unwrap();
- let relative_snapshot_path = format!("{}{}
/{}"
, relative_symlink_to_snapshot_path, suffix, snapshot_filename);
+ let relative_snapshot_path = format!("{}{}
{}/{}", path_to_root
, relative_symlink_to_snapshot_path, suffix, snapshot_filename);
let canonical_last_sync_timestamp = if i == 0 {
// special-case 0 to always refer to a full/initial sync
let canonical_last_sync_timestamp = if i == 0 {
// special-case 0 to always refer to a full/initial sync