summaryrefslogtreecommitdiffstats
path: root/src/commands
diff options
context:
space:
mode:
authorJeff Zhao <jeff.no.zhao@gmail.com>2022-06-08 12:01:36 -0400
committerJeff Zhao <jeff.no.zhao@gmail.com>2022-06-08 12:01:36 -0400
commitf22eecdd3b7addb9b20ec4510106c6ee339d215e (patch)
treeb283686611411d80030c13e72780bbdf00446f32 /src/commands
parent87f2add952791fcc73b8225dffa2a3f6d6882ab4 (diff)
update dependencies
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/delete_files.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/commands/delete_files.rs b/src/commands/delete_files.rs
index e5ef734..126346f 100644
--- a/src/commands/delete_files.rs
+++ b/src/commands/delete_files.rs
@@ -12,17 +12,12 @@ use super::reload;
fn trash_error_to_io_error(err: trash::Error) -> std::io::Error {
match err {
- trash::Error::Unknown => std::io::Error::new(std::io::ErrorKind::Other, "Unknown Error"),
+ trash::Error::Unknown { description } => {
+ std::io::Error::new(std::io::ErrorKind::Other, description)
+ }
trash::Error::TargetedRoot => {
std::io::Error::new(std::io::ErrorKind::Other, "Targeted Root")
}
- trash::Error::CanonicalizePath { code: _ } => {
- std::io::Error::new(std::io::ErrorKind::NotFound, "Not found")
- }
- trash::Error::Remove { code: Some(1) } => std::io::Error::new(
- std::io::ErrorKind::InvalidData,
- "Cannot move files to trash from mounted system",
- ),
_ => std::io::Error::new(std::io::ErrorKind::Other, "Unknown Error"),
}
}