diff options
author | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-19 18:05:08 -0400 |
---|---|---|
committer | Jiayi Zhao <jeff.no.zhao@gmail.com> | 2019-04-19 18:10:28 -0400 |
commit | df9869105eede8bb51ff81f25a80482ab125dfb2 (patch) | |
tree | f1b5f89c7685b6383f90bd4e126a1dbaec35c435 | |
parent | 7380fd2a60b8153815a10dfd9a2e27513b3f7cad (diff) |
add cut/paste for non-linux platforms
-rw-r--r-- | src/commands/file_operations.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/file_operations.rs b/src/commands/file_operations.rs index 7abb5a5..570cc99 100644 --- a/src/commands/file_operations.rs +++ b/src/commands/file_operations.rs @@ -182,7 +182,6 @@ impl PasteFiles { "paste_files" } - #[cfg(target_os = "linux")] fn cut_paste( &self, context: &mut JoshutoContext, @@ -210,13 +209,16 @@ impl PasteFiles { let (tx, rx) = mpsc::channel(); - + #[cfg(target_os = "linux")] let handle = if dest_ino == src_ino { thread::spawn(move || fs_rename_thread(options, tx, destination, paths)) } else { thread::spawn(move || fs_cut_thread(options, tx, destination, paths)) }; + #[cfg(not(target_os = "linux"))] + let handle = thread::spawn(move || fs_cut_thread(options, tx, destination, paths)); + let thread = FileOperationThread { tab_src, tab_dest, |