From 591d85c00ea8c833b5687c512191eec052e747df Mon Sep 17 00:00:00 2001 From: Lauri Piisang Date: Wed, 11 Jul 2018 14:24:46 +0300 Subject: [PATCH] remove unnecessary recursive flag You are dealing with files, not directories, so using recursive flag for removal can only create potential disaster scenarios (in case variable is blank for example). Most likely, you don't need the `-f` flag either. --- share/cht.sh.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/cht.sh.txt b/share/cht.sh.txt index 1031368..4551737 100755 --- a/share/cht.sh.txt +++ b/share/cht.sh.txt @@ -149,7 +149,7 @@ mkdir -p "$HOME/.cht.sh/" lines=$(tput lines) TMP1=$(mktemp /tmp/cht.sh.XXXXXXXXXXXXX) -trap 'rm -rf $TMP1 $TMP2' EXIT +trap 'rm -f $TMP1 $TMP2' EXIT trap 'true' INT if ! [ -e "$HOME/.cht.sh/.hushlogin" ] && [ -z "$this_query" ]; then