Throw away tmp files if mv fails

Attempt to get rid of stale temp files that occasionally drop. While
there is anecdotal evidence that this doesn't solve the problem, it
doesn't hurt, and it's the only place I can see to fix it.
This commit is contained in:
rupa committed 2013-05-20 12:51:43 -04:00
1 parent 19de191e25
commit db827eec15
1 file changed
+1 -1
+1 -1
View File
@@ -80,7 +80,7 @@ _z() {
if [ $? -ne 0 -a -f "$datafile" ]; then
env rm -f "$tempfile"
else
env mv -f "$tempfile" "$datafile"
env mv -f "$tempfile" "$datafile" || env rm -f "$tmpfile"
fi
# tab completion