This commit is contained in:
jkoonts 2024-03-30 00:29:29 -04:00
parent 22413ba891
commit b00c02a50d
3 changed files with 7 additions and 5 deletions

View File

@ -11,6 +11,8 @@ readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
Fasching = "0.2.0" #Fasching = "0.2.0"
Fasching = {path = "../Fasching/"}
clap = { version = "4.5.4", features = ["derive"] } clap = { version = "4.5.4", features = ["derive"] }
whoami = "1.5.1" whoami = "1.5.1"

View File

@ -14,8 +14,8 @@ pub struct CompareMode {
impl CompareMode { impl CompareMode {
pub fn new(options: Arguments, left: String, right: String, selection: Option<String>, count_only: Option<bool>) -> CompareMode { pub fn new(options: Arguments, left: String, right: String, selection: Option<String>, count_only: Option<bool>) -> CompareMode {
let left = import_snapshot(left); let left = import_snapshot(left).unwrap_or_default();
let right = import_snapshot(right); let right = import_snapshot(right).unwrap_or_default();
CompareMode { CompareMode {
left, left,

View File

@ -36,11 +36,11 @@ impl CreateMode {
impl CreateMode { impl CreateMode {
pub fn run(&mut self) { 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(); self.snapshot = snapshot.clone();
if let Ok(e) = snapshot.file_hashes.lock() { if let Ok(e) = snapshot.file_hashes.lock() {
println!("Total FileHash Entries {}", e.len()); 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();
} }
} }