]> granicus.if.org Git - postgis/commitdiff
Make sure the created backend temp directory is world writeable
authorSandro Santilli <strk@keybit.net>
Fri, 24 Feb 2012 20:17:38 +0000 (20:17 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 24 Feb 2012 20:17:38 +0000 (20:17 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9290 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test

index 94ed0001588f229398f39ed362a8fa9837091f57..856c23952802506e32130fb98b3de7588abf0721 100755 (executable)
@@ -199,9 +199,8 @@ run_simple_test ()
        TMPFILE="${BETMPDIR}/test_${RUN}_tmp"
        DIFFILE="${TMPDIR}/test_${RUN}_diff"
 
-       if [ ! -d "${BETMPDIR}" ]; then
-               mkdir ${BETMPDIR}
-       fi
+       mkdir -p "${BETMPDIR}"
+       chmod 777 "${BETMPDIR}"
 
        # Use intermediate file to prevent MingW buffering problems
        ${PSQL} -v "VERBOSITY=terse" -v "tmpfile='${TMPFILE}'" -tXA < "${_sql}" ${DB} 2>&1 \
@@ -225,9 +224,7 @@ run_simple_test ()
                | sed 's/^ROLLBACK/COMMIT/' \
                > "${OUTFILE}"
 
-       if [ -d "${BETMPDIR}" ]; then
-               rm -rf "${BETMPDIR}" # should we keep these ?
-       fi
+       rm -rf "${BETMPDIR}" # should we keep these ?
 
        if test x"$OPT_EXPECT" = "xyes"; then
                echo_inline " expected"