Merge pull request #44 from Ledest/master

encfssh: use mktemp(1) for create unique unenc_dir
This commit is contained in:
Valient Gough 2014-12-27 22:44:59 -08:00 committed by Valient Gough
parent 75837b902c
commit 0e6aa91084

View File

@ -28,16 +28,14 @@ if [ ! -z "$2" ]; then
mount_public=true mount_public=true
fi fi
done done
[ -d "$unenc_dir" ] || mkdir $unenc_dir
else else
unenc_dir=.$RANDOM.$RANDOM unenc_dir=$(mktemp -d .XXXXXXXX)
fi fi
if [ ! -d "$enc_dir" ]; then if [ ! -d "$enc_dir" ]; then
mkdir $enc_dir mkdir $enc_dir
fi fi
if [ ! -d "$unenc_dir" ]; then
mkdir $unenc_dir
fi
enc_dir=$(canonicalize "$enc_dir") enc_dir=$(canonicalize "$enc_dir")
unenc_dir=$(canonicalize "$unenc_dir") unenc_dir=$(canonicalize "$unenc_dir")