Support for group names containing spaces (#245)

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"
This commit is contained in:
daninthewoods authored and rupa committed 2018-08-02 11:58:49 -04:00
1 parent fdf133e9fe
commit ad437e8860
1 file changed
+1 -1
+1 -1
View File
@@ -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