From 1c9f06e5cd8c403ad88165fb4bef14b44c9dd550 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 12 Nov 2006 20:59:51 +0000 Subject: [PATCH] Better error message when config.sh is missing (Similar fix to DB.pm) --- lib/Packages/Config.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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." ); } -- 2.39.2