summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-05-01 09:40:15 +0100
committerNick White <git@njw.me.uk>2009-05-01 09:40:15 +0100
commita6055bfb9b9847021ab93cddfdc31357b2c7fc38 (patch)
tree95637bd21e57fb62d5f99e5eaf8e6a0341070869 /includes
parenta6a068beefb220971dc2bfdd75c4bb202d3819cf (diff)
downloadgemrb-gameinstallers-a6055bfb9b9847021ab93cddfdc31357b2c7fc38.tar.bz2
gemrb-gameinstallers-a6055bfb9b9847021ab93cddfdc31357b2c7fc38.zip
Fixed targetdir setting (thanks Nick Daly)
Fixed a problem with setting targetdir which could result in the current directory being deleted.
Diffstat (limited to 'includes')
-rw-r--r--includes/generic-includes.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh
index d3db9bf..983853a 100644
--- a/includes/generic-includes.sh
+++ b/includes/generic-includes.sh
@@ -17,7 +17,7 @@
[ -z "$TMPDIR" ] && export TMPDIR="/tmp/iepatch"
-[ -z "$TARGETDIR" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
+[ -z "$TARGETDIR" ] && [ -e "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
[ -z "$LANGUAGE" ] && export LANGUAGE="English"