fix nathan's problem
This commit is contained in:
parent
544877aed8
commit
b55751f2c0
1 changed files with 6 additions and 4 deletions
|
@ -25,10 +25,12 @@ pub fn empty(dry: bool, days: Option<u32>) -> Result<()> {
|
|||
println!("{:?}", file.path);
|
||||
} else {
|
||||
fs::remove_file(file.info_path)?;
|
||||
if file.deleted_path.is_dir() {
|
||||
fs::remove_dir_all(file.deleted_path)?;
|
||||
} else {
|
||||
fs::remove_file(file.deleted_path)?;
|
||||
if file.deleted_path.exists() {
|
||||
if file.deleted_path.is_dir() {
|
||||
fs::remove_dir_all(file.deleted_path)?;
|
||||
} else {
|
||||
fs::remove_file(file.deleted_path)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue