.
This commit is contained in:
parent
0f877fd0d0
commit
df9ea5a855
@ -6,6 +6,6 @@ edition = "2021"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
Fasching = "0.1.18"
|
||||
Fasching = "0.1.19"
|
||||
#Fasching = {path = "../Fasching/"}
|
||||
whoami = "1.5.1"
|
||||
|
@ -1,4 +1,5 @@
|
||||
use Fasching::{create_snapshot, export_snapshot};
|
||||
use Fasching::hasher::HashType;
|
||||
use Fasching::hasher::HashType::BLAKE3;
|
||||
use Fasching::snapshot::Snapshot;
|
||||
use crate::syscompare::Comparer;
|
||||
@ -15,8 +16,9 @@ impl CreateMode {
|
||||
if snapshot_path.replace("./", "").is_empty() {
|
||||
panic!("Specify output file name")
|
||||
}
|
||||
|
||||
CreateMode { args, snapshot_path, root_path, snapshot: Default::default() }
|
||||
let bind = root_path.clone();
|
||||
let rp = bind.as_str();
|
||||
CreateMode { args, snapshot_path, root_path, snapshot: create_snapshot(rp, HashType::MD5, vec![]) }
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +27,6 @@ impl Comparer for CreateMode {
|
||||
let snapshot = create_snapshot(self.root_path.as_str(), BLAKE3, vec![]);
|
||||
self.snapshot = snapshot.clone();
|
||||
println!("Total FileHash Entries {}", snapshot.file_hashes.lock().unwrap().len());
|
||||
let _ = export_snapshot(self.snapshot.clone(), self.snapshot_path.clone());
|
||||
let _ = export_snapshot(self.snapshot.clone(), self.snapshot_path.clone(), true);
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ impl SysCompareApp {
|
||||
None => {panic!("Missing hash dir path as second argument")}
|
||||
Some(r) => {not_empty(r)}
|
||||
};
|
||||
let root_dir = match self.args.get(2) {
|
||||
let root_dir = match self.args.get(3) {
|
||||
None => {panic!("Missing hash dir path as second argument")}
|
||||
Some(r) => {not_empty(r)}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user