From 9d5158cbd99b971bef46fd1180b359ae319e251e Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Tue, 16 Aug 2016 14:35:48 -0700 Subject: [PATCH] Check for existence of downloaddir instead of empty string --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index cca3eee..27ecefb 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -275,7 +275,7 @@ fi # Remove any ~ or other oddness in the path we're given DOWNLOADDIR="$(cd ${DOWNLOADDIR// /\\ } && pwd)" -if [ -z "${DOWNLOADDIR}" ]; then +if [ ! -d "${DOWNLOADDIR}" ]; then echo "ERROR: Download directory does not exist or is not a directory" >&2 cronexit 1 fi