mirror of
https://github.com/nivekuil/rip
synced 2025-02-18 13:08:27 +00:00
Simplify seance
This commit is contained in:
parent
318c208ae3
commit
13f16b233e
1 changed files with 3 additions and 13 deletions
14
src/main.rs
14
src/main.rs
|
@ -50,18 +50,8 @@ Send files to the graveyard (/tmp/.graveyard) instead of unlinking them.")
|
|||
// Can't join absolute paths, so we need to strip the leading "/"
|
||||
let cwd: &Path = cwd.strip_prefix("/").expect("cwd doesn't have a root?");
|
||||
if matches.is_present("seance") {
|
||||
for entry in WalkDir::new(graveyard.join(cwd)) {
|
||||
if let Err(_) = entry {
|
||||
println!("No files were laid to rest from this directory.");
|
||||
}
|
||||
else {
|
||||
let entry = entry.unwrap();
|
||||
if entry.depth() == 0 {
|
||||
println!("Finding deleted files..");
|
||||
continue;
|
||||
}
|
||||
println!("{}", entry.path().display())
|
||||
}
|
||||
for entry in WalkDir::new(graveyard.join(cwd)).into_iter().skip(1) {
|
||||
println!("{}", entry.unwrap().path().display());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue