Fix dummy symlink
[rapid-gossip-sync-server] / src / snapshot.rs
index 6894dbb6b24c10c5693d2b43ab469dacfa505eee..86115ea667d287003dc4cb2362f510857ba52d6d 100644 (file)
@@ -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 {