mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-19 19:15:14 +00:00
fix correct use of mktemp
This commit is contained in:
parent
f0cd7f50a2
commit
5eebc89e48
4
src/tomb
4
src/tomb
@ -116,10 +116,10 @@ check_bin() {
|
||||
safe_dir() {
|
||||
which mktemp &> /dev/null
|
||||
if [[ $? = 0 ]]; then
|
||||
mktemp -d /dev/shm/$1.XXXX.$$
|
||||
mktemp -d /dev/shm/$1.$$.XXXXXXX
|
||||
return
|
||||
fi
|
||||
dir="/dev/shm/$1.$RANDOM.$RANDOM.$$"
|
||||
dir="/dev/shm/$1.$$.$RANDOM.$RANDOM"
|
||||
(umask 077 && mkdir "$dir") || print "-1"
|
||||
print "$dir"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user