aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-11-10 11:03:46 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-11-10 11:03:46 +1300
commitb0f1fcedb2d98a0aedf35c4c7c2628841be70e5e (patch)
tree1e073eed5671bcf12679164c85956b66a517214e
parentDon't color colon-delimited labels in Vim comments (diff)
downloaddotfiles-b0f1fcedb2d98a0aedf35c4c7c2628841be70e5e.tar.gz
dotfiles-b0f1fcedb2d98a0aedf35c4c7c2628841be70e5e.zip
Use rmdir(1) rather than `rm -r` in gms lock clear
-rw-r--r--bin/gms.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/gms.sh b/bin/gms.sh
index c33c747e..abbbc063 100644
--- a/bin/gms.sh
+++ b/bin/gms.sh
@@ -4,7 +4,7 @@
lockdir=
cleanup() {
if [ -n "$lockdir" ] ; then
- rm -fr -- "$lockdir"
+ rmdir -- "$lockdir"
fi
if [ "$1" != EXIT ] ; then
trap - "$1"
@@ -25,7 +25,7 @@ for rcfile in "${GETMAIL:-"$HOME"/.getmail}"/getmailrc.* ; do (
lockdir=${TMPDIR:-/tmp}/getmail.$uid.${rcfile##*/}.lock
mkdir -m 0700 -- "$lockdir" 2>/dev/null || exit
try -n 3 -s 15 getmail --rcfile "$rcfile" "$@"
- rm -fr -- "$lockdir"
+ rmdir -- "$lockdir"
lockdir=
) & done