Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct v2 symlink paths #81

Merged
merged 1 commit into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ impl<L: Deref + Clone> Snapshotter<L> where L::Target: Logger {
// 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);

Expand Down Expand Up @@ -185,9 +185,9 @@ impl<L: Deref + Clone> Snapshotter<L> where L::Target: Logger {
};
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 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
Expand Down
Loading