Skip to content

Commit

Permalink
Support for group names containing spaces (#245)
Browse files Browse the repository at this point in the history
When Active Directory is used for Mac authentication then the group name could be "MyCompany\Domain Users".  This causes an error in z during the chown such as "chown: MyCompany\Domain: illegal group name"
  • Loading branch information
daninthewoods authored and rupa committed Aug 2, 2018
1 parent fdf133e commit ad437e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion z.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ _z() {
if [ $? -ne 0 -a -f "$datafile" ]; then
env rm -f "$tempfile"
else
[ "$_Z_OWNER" ] && chown $_Z_OWNER:$(id -ng $_Z_OWNER) "$tempfile"
[ "$_Z_OWNER" ] && chown $_Z_OWNER:"$(id -ng $_Z_OWNER)" "$tempfile"
env mv -f "$tempfile" "$datafile" || env rm -f "$tempfile"
fi

Expand Down

0 comments on commit ad437e8

Please sign in to comment.