diff --git a/Cargo.toml b/Cargo.toml index 479ad87..60747a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,8 @@ readme = "README.md" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -Fasching = "0.2.0" +#Fasching = "0.2.0" +Fasching = {path = "../Fasching/"} + clap = { version = "4.5.4", features = ["derive"] } whoami = "1.5.1" diff --git a/src/comparemode.rs b/src/comparemode.rs index 9715332..3692a46 100644 --- a/src/comparemode.rs +++ b/src/comparemode.rs @@ -14,8 +14,8 @@ pub struct CompareMode { impl CompareMode { pub fn new(options: Arguments, left: String, right: String, selection: Option, count_only: Option) -> CompareMode { - let left = import_snapshot(left); - let right = import_snapshot(right); + let left = import_snapshot(left).unwrap_or_default(); + let right = import_snapshot(right).unwrap_or_default(); CompareMode { left, diff --git a/src/createmode.rs b/src/createmode.rs index ad8a27b..2d1c4f7 100644 --- a/src/createmode.rs +++ b/src/createmode.rs @@ -36,11 +36,11 @@ impl CreateMode { impl CreateMode { pub fn run(&mut self) { - let snapshot = create_snapshot(self.root_path.as_str(), BLAKE3, vec![]); + let snapshot = create_snapshot(self.root_path.as_str(), BLAKE3, vec![]).unwrap(); self.snapshot = snapshot.clone(); if let Ok(e) = snapshot.file_hashes.lock() { println!("Total FileHash Entries {}", e.len()); } - export_snapshot(self.snapshot.clone(), self.snapshot_path.clone(), true); + export_snapshot(self.snapshot.clone(), self.snapshot_path.clone(), true).unwrap(); } }