Index: trunk/PS-IPP-Config/lib/PS/IPP/Config.pm
===================================================================
--- trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 11498)
+++ trunk/PS-IPP-Config/lib/PS/IPP/Config.pm	(revision 11518)
@@ -1,5 +1,5 @@
 # Copyright (c) 2006  Paul Price, Joshua Hoblitt
 #
-# $Id: Config.pm,v 1.26 2007-02-01 00:52:42 eugene Exp $
+# $Id: Config.pm,v 1.27 2007-02-01 02:22:31 eugene Exp $
 
 package PS::IPP::Config;
@@ -102,21 +102,13 @@
     my $found = 0;			# Found it?
     my $realfile;
-    foreach my $path (@path) {
-	$realfile = File::Spec->rel2abs( $filename, $path );
-	if (-f $realfile) {
-	    $found = 1;
-	    last;
-	}
-    }
-    if (not $found) {
-	## try again after a moment?
-	system ("df");
-	select(undef, undef, undef, 0.25);
-
+    my $tries = 0;
+    while (not $found) {
 	## try a second time
 	foreach my $path (@path) {
-	    print "trying: filename: $filename, path: $path -> ";
 	    $realfile = File::Spec->rel2abs( $filename, $path );
-	    print "test: $realfile\n";
+	    if ($tries) {
+		print "re-trying ($tries): filename: $filename, path: $path -> ";
+		print "test: $realfile\n";
+	    }
 	    if (-f $realfile) {
 		$found = 1;
@@ -124,5 +116,13 @@
 	    }
 	}
-	croak "Unable to find camera configuration file $filename\n" if not $found;
+	if (not $found) {
+	    $tries ++;
+	    if ($tries > 4) {
+		croak "Unable to find camera configuration file $filename\n" if not $found;
+	    }
+	    ## try again after a moment?
+	    system ("df");
+	    select(undef, undef, undef, 0.25);
+	}
     }
 
