]> arthur.barton.de Git - bup.git/commitdiff
Don't pass --tmpdir to mktemp or expect it to have a default template.
authorYung-Chin Oei <yungchin@yungchin.nl>
Tue, 4 Sep 2012 12:27:52 +0000 (13:27 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 27 Jan 2013 22:29:58 +0000 (16:29 -0600)
BSD mktemp does not understand --tmpdir, and does not have a default
pattern if none is supplied.

Signed-off-by: Yung-Chin Oei <yungchin@yungchin.nl>
Acked-by: Gabriel Filion <lelutin@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
t/compare-trees
t/test.sh

index 30b6daed8adc13580e1d41222653ae55d5ee8afa..f03fa75ae066d4be272075f9f191c1aeca6798b1 100755 (executable)
@@ -42,7 +42,7 @@ fi
 src="$1"
 dest="$2"
 
-tmpfile="$(mktemp)"
+tmpfile="$(mktemp /tmp/bup-test-XXXXXXX)"
 trap "rm -rf '${tmpfile}'" EXIT
 
 rsync_opts="-niaH$verify_content --delete"
index 4d65f26d3484df59cdfffd1620373412022640ba..e932ad7bd0890ef81e1ce63e7105141adafb1823 100755 (executable)
--- a/t/test.sh
+++ b/t/test.sh
@@ -500,7 +500,7 @@ WVSTART "save disjoint top-level directories"
     rm -rf $D
     mkdir -p $D/x
     date > $D/x/1
-    tmpdir="$(mktemp --tmpdir=/tmp -d bup-test-XXXXXXX)"
+    tmpdir="$(mktemp -d /tmp/bup-test-XXXXXXX)"
     cleanup() { set -x; rm -rf "${tmpdir}"; set +x; }
     trap cleanup EXIT
     date > "$tmpdir/2"