rev blacklist
This commit is contained in:
parent
a9d933d7b0
commit
e8657f7ba4
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "sys-compare"
|
name = "sys-compare"
|
||||||
description = "Track Filesystem Integrity via 'Snapshots' which contain a HashMap of the files and their corresponding hash signature from a specified directory."
|
description = "Track Filesystem Integrity via 'Snapshots' which contain a HashMap of the files and their corresponding hash signature from a specified directory."
|
||||||
version = "0.1.9"
|
version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["james@koonts.net"]
|
authors = ["james@koonts.net"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -25,11 +25,7 @@ impl CreateMode {
|
|||||||
root_path,
|
root_path,
|
||||||
snapshot: Snapshot {
|
snapshot: Snapshot {
|
||||||
file_hashes: Arc::new(Mutex::new(Default::default())),
|
file_hashes: Arc::new(Mutex::new(Default::default())),
|
||||||
black_list: vec![
|
black_list: vec![],
|
||||||
"/dev".to_string(),
|
|
||||||
"/proc".to_string(),
|
|
||||||
"/tmp".to_string(),
|
|
||||||
],
|
|
||||||
root_path: "".to_string(),
|
root_path: "".to_string(),
|
||||||
hash_type: BLAKE3,
|
hash_type: BLAKE3,
|
||||||
uuid: "".to_string(),
|
uuid: "".to_string(),
|
||||||
@ -41,7 +37,11 @@ impl CreateMode {
|
|||||||
|
|
||||||
impl CreateMode {
|
impl CreateMode {
|
||||||
pub fn run(&mut self) -> Result<(), Error> {
|
pub fn run(&mut self) -> Result<(), Error> {
|
||||||
let snapshot = create_snapshot(self.root_path.as_str(), BLAKE3, vec![])?;
|
let snapshot = create_snapshot(self.root_path.as_str(), BLAKE3, vec![
|
||||||
|
"/dev".to_string(),
|
||||||
|
"/proc".to_string(),
|
||||||
|
"/tmp".to_string(),
|
||||||
|
])?;
|
||||||
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());
|
||||||
|
Loading…
Reference in New Issue
Block a user