projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d18c993
)
Handle broken globbing for directories with spaces in them
author
Jamie Cameron
<jcameron@webmin.com>
Fri, 21 Aug 2009 22:37:01 +0000
(15:37 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Fri, 21 Aug 2009 22:37:01 +0000
(15:37 -0700)
useradmin/user-lib.pl
patch
|
blob
|
history
diff --git
a/useradmin/user-lib.pl
b/useradmin/user-lib.pl
index
364639c
..
6e47b82
100755
(executable)
--- a/
useradmin/user-lib.pl
+++ b/
useradmin/user-lib.pl
@@
-1118,7
+1118,7
@@
elsif (-d $_[0]) {
local $glob = "$_[1]/$base/*";
while(1) {
local @g = glob($glob);
- if (@g) {
+ if (@g
&& -r $g[0]
) {
push(@rv, @g);
$glob .= "/*";
}
@@
-1134,7
+1134,8
@@
else {
&set_ownership_permissions($_[2], $_[3], $st[2], "$_[1]/$base");
$nochown++;
}
-&system_logged("chown $opts -R $_[2]:$_[3] \"$_[1]/$base\" >/dev/null 2>/dev/null") if (!$nochown);
+&system_logged("chown $opts -R $_[2]:$_[3] ".quotemeta("$_[1]/$base").
+ " >/dev/null 2>/dev/null") if (!$nochown);
return @rv;
}