diff options
| author | fukachan <fukachan> | 2004-12-29 08:15:19 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-12-29 08:15:19 +0000 |
| commit | 3c8336e73bc8e5ebb6527447ffadd6f46c4b6fa9 (patch) | |
| tree | 437051f5b8ded9a12de72cf016f39d013b3a7b32 /fml/lib/FML/Process/Kernel.pm | |
| parent | 83a23f12451dddeec7438b7e1b44072d4ce7322d (diff) | |
| download | fml8-3c8336e73bc8e5ebb6527447ffadd6f46c4b6fa9.tar.gz fml8-3c8336e73bc8e5ebb6527447ffadd6f46c4b6fa9.tar.bz2 fml8-3c8336e73bc8e5ebb6527447ffadd6f46c4b6fa9.zip | |
verify config.{cf,ph} existence
Diffstat (limited to 'fml/lib/FML/Process/Kernel.pm')
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 33c87105..93152f62 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.249 2004/12/18 12:57:19 fukachan Exp $ +# $FML: Kernel.pm,v 1.250 2004/12/19 11:26:33 fukachan Exp $ # package FML::Process::Kernel; @@ -825,9 +825,11 @@ sub resolve_ml_specific_variables my $config_ph_path = $config_cf_path; $config_ph_path =~ s/config.cf/config.ph/; use File::stat; - my $stat_ph = stat($config_ph_path); - my $stat_cf = stat($config_cf_path); - if ((! -f $config_cf_path) || ($stat_ph->mtime > $stat_cf->mtime)) { + my $stat_ph = -f $config_ph_path ? stat($config_ph_path) : undef; + my $stat_cf = -f $config_cf_path ? stat($config_cf_path) : undef; + if ((! -f $config_cf_path) || + (defined $stat_ph && defined $stat_cf && + $stat_ph->mtime > $stat_cf->mtime)) { my $fallback = $resolver_args->{ fallback } || undef; my $fallback_args = { config_cf_path => $config_cf_path, |
