Changeset 11518
- Timestamp:
- Jan 31, 2007, 4:22:31 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
r11498 r11518 1 1 # Copyright (c) 2006 Paul Price, Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1.2 6 2007-02-01 00:52:42eugene Exp $3 # $Id: Config.pm,v 1.27 2007-02-01 02:22:31 eugene Exp $ 4 4 5 5 package PS::IPP::Config; … … 102 102 my $found = 0; # Found it? 103 103 my $realfile; 104 foreach my $path (@path) { 105 $realfile = File::Spec->rel2abs( $filename, $path ); 106 if (-f $realfile) { 107 $found = 1; 108 last; 109 } 110 } 111 if (not $found) { 112 ## try again after a moment? 113 system ("df"); 114 select(undef, undef, undef, 0.25); 115 104 my $tries = 0; 105 while (not $found) { 116 106 ## try a second time 117 107 foreach my $path (@path) { 118 print "trying: filename: $filename, path: $path -> ";119 108 $realfile = File::Spec->rel2abs( $filename, $path ); 120 print "test: $realfile\n"; 109 if ($tries) { 110 print "re-trying ($tries): filename: $filename, path: $path -> "; 111 print "test: $realfile\n"; 112 } 121 113 if (-f $realfile) { 122 114 $found = 1; … … 124 116 } 125 117 } 126 croak "Unable to find camera configuration file $filename\n" if not $found; 118 if (not $found) { 119 $tries ++; 120 if ($tries > 4) { 121 croak "Unable to find camera configuration file $filename\n" if not $found; 122 } 123 ## try again after a moment? 124 system ("df"); 125 select(undef, undef, undef, 0.25); 126 } 127 127 } 128 128
Note:
See TracChangeset
for help on using the changeset viewer.
