From ca4320db8e79a7aff595f21fb04655671fdfa571 Mon Sep 17 00:00:00 2001 From: Alex Malinovich Date: Thu, 11 Aug 2016 18:55:14 -0700 Subject: [PATCH] Simplify DOWNLOADDIR check to remove dangerous eval call --- plexupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexupdate.sh b/plexupdate.sh index 6ebc79c..882e201 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -264,7 +264,7 @@ fi # Remove any ~ or other oddness in the path we're given -DOWNLOADDIR="$(eval cd ${DOWNLOADDIR// /\\ } ; if [ $? -eq 0 ]; then pwd; fi)" +DOWNLOADDIR="$(cd ${DOWNLOADDIR// /\\ } && pwd)" if [ -z "${DOWNLOADDIR}" ]; then echo "ERROR: Download directory does not exist or is not a directory" >&2 cronexit 1