use 'test' to check for file ownership. closes #25. thanks sjmadsen.
This commit is contained in:
1 parent
bad41c20ca
commit
22b68c7e96
1 file changed
+1
-1
@@ -25,7 +25,7 @@ z() {
|
||||
local datafile="$HOME/.z"
|
||||
|
||||
# bail out if we don't own ~/.z (we're another user but our ENV is still set)
|
||||
[ -f "$datafile" -a "$(stat -c %U "$datafile")" != "$USER" ] && return
|
||||
[ -f "$datafile" -a ! -O "$datafile" ] && return
|
||||
|
||||
# add entries
|
||||
if [ "$1" = "--add" ]; then
|
||||
|
||||
Reference in new issue
Block a user