Simplify DOWNLOADDIR check to remove dangerous eval call

This commit is contained in:
Alex Malinovich 2016-08-11 18:55:14 -07:00
commit ca4320db8e

View file

@ -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