summaryrefslogtreecommitdiffstats
path: root/src/commands/file_ops
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-16 16:14:17 -0400
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-03-16 16:14:17 -0400
commitc6edd4e5d5cbcbc16063a10181aee9626822d273 (patch)
tree5524d52e5fb6f288be943c4882973dd1839a95f3 /src/commands/file_ops
parent50f67156b783c3f533214ddfa8e79bd979d76278 (diff)
better error handling for threads
- code cleanup
Diffstat (limited to 'src/commands/file_ops')
-rw-r--r--src/commands/file_ops/paste_copy.rs2
-rw-r--r--src/commands/file_ops/paste_cut.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/commands/file_ops/paste_copy.rs b/src/commands/file_ops/paste_copy.rs
index 943e14f..3a430d1 100644
--- a/src/commands/file_ops/paste_copy.rs
+++ b/src/commands/file_ops/paste_copy.rs
@@ -55,7 +55,7 @@ pub fn paste_copy(
rx_start.recv();
for path in paths {
total += recursive_copy(thread_dest.as_path(), path.as_path(), &options)?;
- tx.send(Event::IOWorkerProgress(total));
+ tx.send(total);
}
Ok(total)
});
diff --git a/src/commands/file_ops/paste_cut.rs b/src/commands/file_ops/paste_cut.rs
index 3d1b610..fb9dc72 100644
--- a/src/commands/file_ops/paste_cut.rs
+++ b/src/commands/file_ops/paste_cut.rs
@@ -63,7 +63,7 @@ pub fn paste_cut(
rx_start.recv();
for path in paths {
total += recursive_cut(thread_dest.as_path(), path.as_path(), &options)?;
- tx.send(Event::IOWorkerProgress(total));
+ tx.send(total);
}
Ok(total)
});