Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
814b340
)
An even better way to un-backslash-escape the filenames from find.
author
Wayne Davison
<wayned@samba.org>
Sat, 2 Sep 2006 19:57:56 +0000
(19:57 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 2 Sep 2006 19:57:56 +0000
(19:57 +0000)
support/file-attr-restore
patch
|
blob
|
blame
|
history
diff --git
a/support/file-attr-restore
b/support/file-attr-restore
index
8c25310
..
7238b00
100755
(executable)
--- a/
support/file-attr-restore
+++ b/
support/file-attr-restore
@@
-48,8
+48,7
@@
while (<>) {
die "Invalid input line $.:\n$_" unless defined $name;
die "A filename is not properly escaped:\n$_" unless $name =~ /^[^"\\]*(\\(\d\d\d|\D)[^"\\]*)*$/;
my $fn = $name;
- $fn =~ s/([\$\@\%])/\\$1/g;
- $fn = eval "\"$fn\"";
+ $fn =~ s/\\(\d+|[A-Za-z]|.)/ eval "\"\\$1\"" /eg;
if ($type eq '-') {
undef $type unless -f $fn;
} elsif ($type eq 'd') {