diff options
Diffstat (limited to 'src/wrappers')
-rw-r--r-- | src/wrappers/tempdir.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wrappers/tempdir.sh b/src/wrappers/tempdir.sh index 8d2754b1c..4426b73a7 100644 --- a/src/wrappers/tempdir.sh +++ b/src/wrappers/tempdir.sh @@ -1,6 +1,13 @@ # As a security measure refuse to proceed if mktemp is not available. pathfind mktemp || { err "Couldn't find 'mktemp'; aborting."; exit 1; } +# Avoid issues with /tmp directory on Windows/Cygwin +cygwin= +cygwin=$(uname | sed -ne '/^CYGWIN/p') +if [ -n "$cygwin" ]; then + TMPDIR=. +fi + THIS_TEMPDIR= THIS_TEMPDIR="$(mktemp -d -t $THIS.XXXXXXXX)" || exit 1 readonly THIS_TEMPDIR |