Skip to content

Commit

Permalink
fix not being able to cut cross device
Browse files Browse the repository at this point in the history
  • Loading branch information
kamiyaa committed Nov 19, 2021
1 parent a3cf8fe commit 63ba972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/io/io_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ pub fn recursive_cut(
progress.set_files_processed(progress.files_processed() + 1);
Ok(())
}
Err(e) if e.kind() == io::ErrorKind::Other => {
Err(e) => {
if file_type.is_dir() {
fs::create_dir(dest_buf.as_path())?;
for entry in fs::read_dir(src)? {
Expand All @@ -270,6 +270,7 @@ pub fn recursive_cut(
tx.clone(),
progress,
)?;
let _ = tx.send(progress.clone());
}
fs::remove_dir(src)?;
} else if file_type.is_symlink() {
Expand Down

0 comments on commit 63ba972

Please sign in to comment.