[SCM] Debian package checker branch, master, updated. 2.5.4-42-g0dd28d6
The following commit has been merged in the master branch:
commit 0dd28d6e5cb074cf42e60dca19e3c5213f8f96e7
Author: Niels Thykier <niels@thykier.net>
Date: Thu Dec 8 17:00:28 2011 +0100
Check etc/php5/conf.d/<file>.ini is a file before opening it
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/files b/checks/files
index e88834a..97ed0ce 100644
--- a/checks/files
+++ b/checks/files
@@ -358,14 +358,16 @@ foreach my $file (@{$info->sorted_index}) {
}
#----------------- /etc/php5/conf.d
elsif ($file =~ m,^etc/php5/conf.d/.+\.ini$,) {
- open (PHPINI, '<', $info->unpacked($file)) or fail("cannot open .ini file: $!");
- while (<PHPINI>) {
- next unless (m/^\s*#/);
- tag 'obsolete-comments-style-in-php-ini', $file;
- # only warn once per file:
- last;
+ if ($index_info->{type} =~ m/^[-h]/) {
+ open (PHPINI, '<', $info->unpacked($file)) or fail("cannot open .ini file: $!");
+ while (<PHPINI>) {
+ next unless (m/^\s*#/);
+ tag 'obsolete-comments-style-in-php-ini', $file;
+ # only warn once per file:
+ last;
+ }
+ close(PHPINI);
}
- close(PHPINI);
}
# ---------------- /etc/rc.d && /etc/rc?.d
elsif ($type ne 'udeb' and $file =~ m,^etc/rc(?:\d|S)?\.d/\S, and $pkg !~ /^(?:sysvinit|file-rc)$/) {
--
Debian package checker
Reply to: