mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 22:09:47 -04:00
Work around illegal (but sometimes happening) PWD state
This commit is contained in:
parent
925f5526ba
commit
42393fa8da
@ -17,8 +17,13 @@ WORKING_DIR=`pwd`
|
|||||||
PRG_DIR=`dirname "$PRG"`
|
PRG_DIR=`dirname "$PRG"`
|
||||||
APP_ROOT=`cd "$PRG_DIR" && pwd`
|
APP_ROOT=`cd "$PRG_DIR" && pwd`
|
||||||
|
|
||||||
# restore original working dir
|
# restore original working dir (which may be /root and yield permission denied)
|
||||||
|
if [ -x "$WORKING_DIR" ]; then
|
||||||
cd "$WORKING_DIR"
|
cd "$WORKING_DIR"
|
||||||
|
else
|
||||||
|
cd "/volume1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# make sure required environment variables are set
|
# make sure required environment variables are set
|
||||||
if [ -z "$USER" ]; then
|
if [ -z "$USER" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user