From b9ee041e8f630ae2cdd0ff644d0f92c2304b9078 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 6 May 2009 12:54:09 +0000 Subject: improve tempdir creation --- libalpine.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libalpine.sh.in b/libalpine.sh.in index add5798..ad741c0 100755 --- a/libalpine.sh.in +++ b/libalpine.sh.in @@ -38,9 +38,9 @@ eecho() { init_tmpdir() { local omask=`umask` - local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`" + local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`-$RANDOM" umask 077 || die "umask" - mkdir "$__tmpd" || exit 1 + mkdir -p "$__tmpd" || exit 1 trap "rm -fr \"$__tmpd\"; exit" 0 umask $omask eval "$1=\"$__tmpd\"" -- cgit v1.2.3