--- shtool.orig 2002-12-30 05:07:57.000000000 +0100 +++ shtool 2005-06-10 04:26:15.000000000 +0200 @@ -409,7 +409,13 @@ else tmpdir="/tmp" fi - tmpfile="$tmpdir/.shtool.$$" + if mkdir "$tmpdir/.shtool.$$"; then + tmpfile="$tmpdir/.shtool.$$/shtool.tmp" + else + echo "$msgprefix:Error: failed to create temporary file" 1>&2 + exit 1 + fi + tmpfile="$tmpdir/.shtool.$$/shtool.tmp" rm -f $tmpfile >/dev/null 2>&1 touch $tmpfile chmod 600 $tmpfile