Escape strings for use in matches.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19852 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonas Häggqvist 2009-01-25 15:32:03 +00:00
parent e5958df469
commit 03e90f841c

View file

@ -194,13 +194,13 @@ foreach my $file (@ARGV) {
elsif ($changetarget) {
# Change target if set and it's the same as $from
if ($id ne "" and grep(/$id/, @ids) and $location =~ /source|dest|voice/ and $target eq $from) {
$line =~ s/$from/$to/;
$line =~ s/\Q$from/$to/;
}
}
elsif ($changesource) {
# Change string if $target is set and matches $s_target
if ($id ne "" and grep(/$id/, @ids) and $target eq $s_target and $location eq "source") {
$line =~ s/$string/$to/;
$line =~ s/\Q$string/$to/;
}
}
elsif ($changedesc) {