From: Joey Hess Date: Sat, 22 Jan 2011 05:05:08 +0000 (-0400) Subject: Fix bug in escaping. X-Git-Url: https://git.madduck.net/code/myrepos.git/commitdiff_plain/cbe6d498a888331bb94c052abc0d240a1f4b7811 Fix bug in escaping. --- diff --git a/debian/changelog b/debian/changelog index eda8e6f..d40a73f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mr (1.02) UNRELEASED; urgency=low + + * Fix bug in escaping. + + -- Joey Hess Sat, 22 Jan 2011 01:04:01 -0400 + mr (1.01) unstable; urgency=low * Add "mr run", which can run an arbitrary command in each repository. diff --git a/mr b/mr index 48c355c..2c7c4da 100755 --- a/mr +++ b/mr @@ -641,7 +641,7 @@ sub action { $command="set -e; ".$lib. "my_action(){ $command\n }; my_action ". - join(" ", map { s/\//\/\//g; s/"/\"/g; '"'.$_.'"' } @ARGV); + join(" ", map { s/\\/\\\\/g; s/"/\"/g; '"'.$_.'"' } @ARGV); print "mr $action: running >>$command<<\n" if $verbose; my $ret=system($command); if ($ret != 0) { @@ -1417,7 +1417,7 @@ sub register { $ENV{MR_REPO}=~s/.*\/(.*)/$1/; $command="set -e; ".$config{$directory}{DEFAULT}{lib}."\n". "my_action(){ $command\n }; my_action ". - join(" ", map { s/\//\/\//g; s/"/\"/g; '"'.$_.'"' } @ARGV); + join(" ", map { s/\\/\\\\/g; s/"/\"/g; '"'.$_.'"' } @ARGV); print "mr register: running >>$command<<\n" if $verbose; exec($command) || die "exec: $!"; }