mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-20 13:23:21 -07:00
Stop users from saving config with invalid download directory
This commit is contained in:
parent
cb30231fac
commit
c122a14261
1 changed files with 5 additions and 1 deletions
|
@ -382,6 +382,10 @@ done
|
||||||
# This will destroy and recreate the config file. Any settings that are set in the config file but are no longer
|
# This will destroy and recreate the config file. Any settings that are set in the config file but are no longer
|
||||||
# valid will NOT be saved.
|
# valid will NOT be saved.
|
||||||
if [ "${SAVECONFIG}" = "yes" ]; then
|
if [ "${SAVECONFIG}" = "yes" ]; then
|
||||||
|
if [ ! -d "$(eval cd ${DOWNLOADDIR// /\\ } 2>/dev/null && pwd)" ]; then
|
||||||
|
error "Download directory does not exist or is not a directory (tried \"${DOWNLOADDIR}\")"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "# Config file for plexupdate" >${CONFIGFILE:="${HOME}/.plexupdate"}
|
echo "# Config file for plexupdate" >${CONFIGFILE:="${HOME}/.plexupdate"}
|
||||||
|
|
||||||
for VAR in AUTOINSTALL CRON AUTODELETE DOWNLOADDIR EMAIL PASS FORCE FORCEALL PUBLIC QUIET AUTOSTART AUTOUPDATE PLEXSERVER PLEXPORT CHECKUPDATE
|
for VAR in AUTOINSTALL CRON AUTODELETE DOWNLOADDIR EMAIL PASS FORCE FORCEALL PUBLIC QUIET AUTOSTART AUTOUPDATE PLEXSERVER PLEXPORT CHECKUPDATE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue