[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: checks/cruft.pm: Use \Q & \E to "quotemeta" the embedded variable in regular expression. Thanks, Niels!



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit fb18b0416dee3c31b6595fe590e56c81c5dd915e
Author: Chris Lamb <lamby@debian.org>
Date:   Wed Mar 7 09:18:39 2018 -0800

    checks/cruft.pm: Use \Q & \E to "quotemeta" the embedded variable in regular expression. Thanks, Niels!
---
 checks/cruft.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/checks/cruft.pm b/checks/cruft.pm
index 5a7ef79..9406ee0 100644
--- a/checks/cruft.pm
+++ b/checks/cruft.pm
@@ -1575,7 +1575,8 @@ sub _ships_examples {
         # If we have an -examples package, assume we ship examples.
         return 1 if $name =~ m{-examples$};
         my @files = $binpkg->info->sorted_index;
-        return 1 if any { m{^usr/share/doc/$name/(.+/)?examples/$} } @files;
+        return 1
+          if any { m{^usr/share/doc/\Q$name\E/(.+/)?examples/$} } @files;
     }
     return;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: