summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/event_exec.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/event_exec.rs b/src/event_exec.rs
index e3d35a0..69525ca 100644
--- a/src/event_exec.rs
+++ b/src/event_exec.rs
@@ -511,8 +511,11 @@ impl EventAction {
/// Executes a `dragon-drop` command on the selected file.
/// It obviously requires the `dragon-drop` command to be installed.
pub fn drag_n_drop(status: &mut Status) -> Result<()> {
- let tab = status.selected_non_mut();
- let Some(file) = tab.selected() else {
+ if !is_program_in_path(DEFAULT_DRAGNDROP) {
+ write_log_line(format!("{DEFAULT_DRAGNDROP} must be installed."));
+ return Ok(());
+ }
+ let Some(file) = status.selected_non_mut().selected() else {
return Ok(());
};
let path_str = file