From: Andrei Date: Tue, 16 May 2023 00:00:00 +0000 (+0000) Subject: Fix dummy symlink X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=6103c716281a16f5131a9c792a84ec0d3705daa6;p=rapid-gossip-sync-server Fix dummy symlink The commit changes the symlink for the snapshot for the current date from `./res/snapshots_pending/empty_delta.lngossip` to `../snapshots/empty_delta.lngossip` such that nginx does not retrun 404, but 200 with the dummy snapshot --- diff --git a/src/snapshot.rs b/src/snapshot.rs index 6894dbb..86115ea 100644 --- a/src/snapshot.rs +++ b/src/snapshot.rs @@ -95,8 +95,9 @@ impl Snapshotter { fs::write(&dummy_snapshot_path, dummy_snapshot).unwrap(); let dummy_symlink_path = format!("{}/{}.bin", pending_symlink_directory, reference_timestamp); - println!("Symlinking dummy: {} -> {}", dummy_symlink_path, dummy_snapshot_path); - symlink(&dummy_snapshot_path, &dummy_symlink_path).unwrap(); + let relative_dummy_snapshot_path = format!("{}/{}", relative_symlink_to_snapshot_path, dummy_filename); + println!("Symlinking dummy: {} -> {}", dummy_symlink_path, relative_dummy_snapshot_path); + symlink(&relative_dummy_snapshot_path, &dummy_symlink_path).unwrap(); } for i in 0..10_001u64 {