]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
An even better way to un-backslash-escape the filenames from find.
authorWayne Davison <wayned@samba.org>
Sat, 2 Sep 2006 19:57:56 +0000 (19:57 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 2 Sep 2006 19:57:56 +0000 (19:57 +0000)
support/file-attr-restore

index 8c25310e88d6efc04aaf7e12ff0e5e0112357a56..7238b00fc519a32176cdcda623d76c94d66f727d 100755 (executable)
@@ -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') {