mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-05 01:05:45 +08:00
tmpdir.sh: Use the -t flag for mktemp
This commit is contained in:
@@ -45,7 +45,8 @@ mk_tmpdir() {
|
||||
else
|
||||
local tool="${0##*/}"
|
||||
local pid="$$"
|
||||
TMPDIR=`mktemp -d /tmp/${tool}.${pid}.XXXXXX` \
|
||||
local x="$TMPDIR"
|
||||
TMPDIR=`TMPDIR="$x" mktemp -d -t "${tool}.${pid}.XXXXXX"` \
|
||||
|| die "Cannot make secure tmpdir"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user