From: Zhang Qiang Date: Thu, 2 May 2013 01:40:48 +0000 (+0800) Subject: quote metacharacters in pattern to fix strip issue if metacharacters exist X-Git-Tag: 0.7~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80af05dacf35a4727a1add24aa83ded90d346712;p=tools%2Fdepanneur.git quote metacharacters in pattern to fix strip issue if metacharacters exist Change-Id: Iced588ef2dcc7f96cb7181c41e987eb0e3c0c1f7 --- diff --git a/depanneur b/depanneur index 321aead..12c6281 100755 --- a/depanneur +++ b/depanneur @@ -585,9 +585,9 @@ sub prepare_git { my $tmp_dir = abs_path(tempdir(CLEANUP=>1)); my $tmp_spec = "$tmp_dir/$spec_file"; my $without_base = $spec; - $without_base =~ s!$base/!!; + $without_base =~ s!\Q$base\E/!!; if (my_system("cd $base; git show $commit:$without_base >$tmp_spec 2>/dev/null") != 0) { - warning("failed to checkout spec file from commit: $commit"); + warning("failed to checkout spec file from commit: $commit:$without_base"); return; } $spec = $tmp_spec;