summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDLFW <daniel@llin.info>2022-01-09 23:14:56 +0100
committerGitHub <noreply@github.com>2022-01-09 17:14:56 -0500
commite428cf22dd1f5f735c5b51ab03986b700201dfa4 (patch)
tree4e7ccfae69e78eadc4f92f67872b50b6dbd5e788 /src
parent470e33d1ecbd1eb8dcfe1504b969d20f6cfeaee3 (diff)
Fix: invoke correct hook script (#121)
When the preview disappears, the "shown" hook script was spawned instead of the "removed" hook script. This mistake was not obvious with the preview-image recipe from the docs which works also with the shown-script on remove.
Diffstat (limited to 'src')
-rw-r--r--src/run.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/run.rs b/src/run.rs
index bfe6b16..63fa7d0 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -166,7 +166,7 @@ fn process_preview_on_change(
}
}
None => {
- if let Some(hook_script) = preview_shown_hook_script {
+ if let Some(hook_script) = preview_removed_hook_script {
let hook_script = hook_script.to_path_buf();
let _ = thread::spawn(|| {
let _ = process::Command::new(hook_script).status();