rename binary, fix listing

This commit is contained in:
Luca Bilke 2024-06-05 12:58:42 +02:00
parent 4a99218469
commit c95ce8a586
No known key found for this signature in database
GPG Key ID: C9E851809C1A5BDE
4 changed files with 11 additions and 7 deletions

4
Cargo.lock generated
View File

@ -336,8 +336,8 @@ dependencies = [
] ]
[[package]] [[package]]
name = "trash-cli" name = "trash-util"
version = "0.1.0" version = "0.0.2"
dependencies = [ dependencies = [
"chrono", "chrono",
"clap", "clap",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "trash-cli" name = "trash-util"
version = "0.1.0" version = "0.0.2"
edition = "2021" edition = "2021"
# 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

View File

@ -1,5 +1,5 @@
# trash-cli # trash-util
An extremely minimalistic trash client. It's meant to be used by a wrapper script. An extremely minimalistic trash client. It's meant to be used by a wrapper script.
`trash-cli list` output is null-delimited. `trash-util list` output is null-delimited.

View File

@ -35,7 +35,11 @@ fn print_list(path: Option<PathBuf>) {
Ok(p) => p, Ok(p) => p,
Err(_) => item.original_parent.clone(), Err(_) => item.original_parent.clone(),
}; };
*p.canonicalize().unwrap() == orig let pc = p.canonicalize();
match pc {
Ok(pc) => pc == orig,
Err(_) => false,
}
}), }),
None => Box::new(|_| true), None => Box::new(|_| true),
}; };