IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2007, 2:52:42 PM (19 years ago)
Author:
eugene
Message:

fixed test for slow NSF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Config/lib/PS/IPP/Config.pm

    r11497 r11498  
    11# Copyright (c) 2006  Paul Price, Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.25 2007-01-31 23:41:36 eugene Exp $
     3# $Id: Config.pm,v 1.26 2007-02-01 00:52:42 eugene Exp $
    44
    55package PS::IPP::Config;
     
    100100
    101101    my @path = split /:/, $self->{path}; # List of paths to try
    102     my $found;                  # Found it?
     102    my $found = 0;                      # Found it?
     103    my $realfile;
    103104    foreach my $path (@path) {
    104         my $test = File::Spec->rel2abs( $filename, $path );
    105         if (-f $test) {
    106             $found = $test;
     105        $realfile = File::Spec->rel2abs( $filename, $path );
     106        if (-f $realfile) {
     107            $found = 1;
    107108            last;
    108109        }
    109110    }
    110     if (not defined $found) {
     111    if (not $found) {
    111112        ## try again after a moment?
    112113        system ("df");
     
    114115
    115116        ## try a second time
    116         my $found;
    117117        foreach my $path (@path) {
    118118            print "trying: filename: $filename, path: $path -> ";
    119             my $test = File::Spec->rel2abs( $filename, $path );
    120             print "test: $test\n";
    121             if (-f $test) {
    122                 $found = $test;
     119            $realfile = File::Spec->rel2abs( $filename, $path );
     120            print "test: $realfile\n";
     121            if (-f $realfile) {
     122                $found = 1;
    123123                last;
    124124            }
    125125        }
    126         croak "Unable to find camera configuration file $filename\n" if not defined $found;
     126        croak "Unable to find camera configuration file $filename\n" if not $found;
    127127    }
    128128
    129129    # Read the file
    130     open my $file, $found or croak "Unable to open camera configuration file $found: $!";
     130    open my $file, $realfile or croak "Unable to open camera configuration file $realfile: $!";
    131131    my @contents = <$file>;
    132132    close $file;
Note: See TracChangeset for help on using the changeset viewer.