From eef0745da8e78d39afdbdd4bcc1b57d43919be83 Mon Sep 17 00:00:00 2001 From: Henric Andersson Date: Sat, 19 Sep 2015 09:53:30 -0700 Subject: [PATCH] Misunderstood issue, now properly fixed --- plexupdate.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plexupdate.sh b/plexupdate.sh index b092d92..792e8c9 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -131,14 +131,13 @@ if [ "${AUTOINSTALL}" == "yes" ]; then fi fi -# Make sure download directory is sane -if [ ! -d "${DOWNLOADDIR}" ]; then + +# Remove any ~ or other oddness in the path we're given +eval pushd "${DOWNLOADDIR}" > /dev/null 2>/dev/null +if [ $? -ne 0 ]; then echo "Error: Download directory does not exist or is not a directory" exit 1 fi - -# Remove any ~ or other oddness in the path we're given -eval pushd "${DOWNLOADDIR}" > /dev/null DOWNLOADDIR="$(pwd)" popd > /dev/null