fix move_to_trash

This commit is contained in:
weisd
2025-03-20 00:23:10 +08:00
parent ff4769ca1e
commit a12d48595e
9 changed files with 193 additions and 162 deletions
+10
View File
@@ -565,3 +565,13 @@ pub fn is_err_os_not_exist(err: &Error) -> bool {
false
}
}
pub fn is_err_os_disk_full(err: &Error) -> bool {
if let Some(os_err) = err.downcast_ref::<io::Error>() {
is_sys_err_no_space(os_err)
} else if let Some(e) = err.downcast_ref::<DiskError>() {
e == &DiskError::DiskFull
} else {
false
}
}