summaryrefslogtreecommitdiffstats
path: root/src/commands/open_file.rs
diff options
context:
space:
mode:
authorJiayi Zhao <jeff.no.zhao@gmail.com>2020-02-09 12:39:31 -0500
committerJiayi Zhao <jeff.no.zhao@gmail.com>2020-02-09 13:07:31 -0500
commitbecbb90b2f22d58c98693d653f55ba604bb03f75 (patch)
tree085b9ac9b197a9ad3f0dd20df36848c5619adefe /src/commands/open_file.rs
parent656582a6c867c25667661be9b327b4cc73859d7d (diff)
rework input thread and file operations
- no longer depend on fs_extra for copy/paste files - in house solution preserves permissions - ioworkers are now queued, no more parallel io tasks - input thread now listens for ioworker threads as well - cargo fmt
Diffstat (limited to 'src/commands/open_file.rs')
-rw-r--r--src/commands/open_file.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/open_file.rs b/src/commands/open_file.rs
index 6651e3c..60dafe5 100644
--- a/src/commands/open_file.rs
+++ b/src/commands/open_file.rs
@@ -71,13 +71,15 @@ impl OpenFile {
/* try executing with user defined entries */
if !mimetype_options.is_empty() {
mimetype_options[0].execute_with(&paths)?;
- } else if context.config_t.xdg_open { // try system defined entries
+ } else if context.config_t.xdg_open {
+ // try system defined entries
ncurses::savetty();
ncurses::endwin();
open::that(paths[0]).unwrap();
ncurses::resetty();
ncurses::refresh();
- } else { // ask user for command
+ } else {
+ // ask user for command
OpenFileWith::open_with(&paths)?;
}
let curr_tab = &mut context.tabs[context.curr_tab_index];