From: Frank Lichtenheld Date: Sun, 12 Nov 2006 20:59:51 +0000 (+0000) Subject: Better error message when config.sh is missing X-Git-Tag: switch-to-templates~3 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=1c9f06e5cd8c403ad88165fb4bef14b44c9dd550;p=deb%2Fpackages.git Better error message when config.sh is missing (Similar fix to DB.pm) --- diff --git a/lib/Packages/Config.pm b/lib/Packages/Config.pm index 43ea37a..e749735 100644 --- a/lib/Packages/Config.pm +++ b/lib/Packages/Config.pm @@ -27,9 +27,9 @@ our $config_read_time; sub init { my ($dir) = @_; - my $modtime = (stat( "$dir/config.sh" ))[9]; + my $modtime = (stat( "$dir/config.sh" ))[9] || 0; $config_read_time ||= 0; - if ($modtime > $config_read_time) { + if ($modtime >= $config_read_time) { if (!open (C, '<', "$dir/config.sh")) { error( "Internal: Cannot open configuration file." ); }