From be941928bc7b321f0f95ebea0d8e76cb18eee551 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Fri, 25 Jun 2021 11:03:00 +0200 Subject: [PATCH] dmenuhandler safer exit on non-input --- .local/bin/tools/dmenuhandler | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.local/bin/tools/dmenuhandler b/.local/bin/tools/dmenuhandler index 831334f..ecdc267 100755 --- a/.local/bin/tools/dmenuhandler +++ b/.local/bin/tools/dmenuhandler @@ -33,7 +33,9 @@ case "$choice" in "rifle file") curl -L "$1" -o "/tmp/riflefile" rifle /tmp/riflefile;; "watch thread") dest="$(dmenuinput 'name of folder:')" + [ -z "$dest" ] && exit echo "dmenuhandler:$dest" + mkdir -p "$(makepathabsolute "$dest")" threadwatcher add "$1" "$dest" & notify-send "dmenuhandler" "Thread watcher started. Download initialized.";; "rip media") dest="$(dmenuinput 'name of folder:')"