Don't use basename and quote $dir in tmpdir.sh.

This commit is contained in:
Daniel Nichter
2012-01-31 10:20:37 -07:00
parent 9bf345f88a
commit 6205505263
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -433,11 +433,11 @@ mk_tmpdir() {
if [ -n "$dir" ]; then if [ -n "$dir" ]; then
if [ ! -d "$dir" ]; then if [ ! -d "$dir" ]; then
mkdir $dir || die "Cannot make tmpdir $dir" mkdir "$dir" || die "Cannot make tmpdir $dir"
fi fi
TMPDIR="$dir" TMPDIR="$dir"
else else
local tool=`basename $0` local tool="${0##*/}"
local pid="$$" local pid="$$"
TMPDIR=`mktemp -d /tmp/${tool}.${pid}.XXXXX` \ TMPDIR=`mktemp -d /tmp/${tool}.${pid}.XXXXX` \
|| die "Cannot make secure tmpdir" || die "Cannot make secure tmpdir"
+2 -2
View File
@@ -39,11 +39,11 @@ mk_tmpdir() {
if [ -n "$dir" ]; then if [ -n "$dir" ]; then
if [ ! -d "$dir" ]; then if [ ! -d "$dir" ]; then
mkdir $dir || die "Cannot make tmpdir $dir" mkdir "$dir" || die "Cannot make tmpdir $dir"
fi fi
TMPDIR="$dir" TMPDIR="$dir"
else else
local tool=`basename $0` local tool="${0##*/}"
local pid="$$" local pid="$$"
TMPDIR=`mktemp -d /tmp/${tool}.${pid}.XXXXX` \ TMPDIR=`mktemp -d /tmp/${tool}.${pid}.XXXXX` \
|| die "Cannot make secure tmpdir" || die "Cannot make secure tmpdir"