summaryrefslogtreecommitdiff
path: root/libalpine.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'libalpine.sh.in')
-rwxr-xr-xlibalpine.sh.in4
1 files 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\""