better error handling for issues 30 and 31
This commit is contained in:
1 parent
860fe10fe1
commit
2613c630bd
1 file changed
+5
-1
@@ -60,7 +60,11 @@ _z() {
|
||||
} else for( i in rank ) print i "|" rank[i] "|" time[i]
|
||||
}
|
||||
' "$datafile" 2>/dev/null >| "$tempfile"
|
||||
env mv -f "$tempfile" "$datafile"
|
||||
if [ $? -ne 0 -a -f "$datafile" ]; then
|
||||
env rm -f "$tempfile"
|
||||
else
|
||||
env mv -f "$tempfile" "$datafile"
|
||||
fi
|
||||
|
||||
# tab completion
|
||||
elif [ "$1" = "--complete" ]; then
|
||||
|
||||
Reference in new issue
Block a user