diff -r 067d8e76261e src/physfs.c
--- a/src/physfs.c	Mon Sep 06 02:50:29 2010 -0400
+++ b/src/physfs.c	Wed Sep 29 15:41:12 2010 +0200
@@ -2262,7 +2261,6 @@
 
     if (sanitizePlatformIndependentPath(_fname, fname))
     {
-        int fileExists = 0;
         DirHandle *i = NULL;
         PHYSFS_Io *io = NULL;
 
@@ -2270,20 +2268,17 @@
 
         GOTO_IF_MACRO(!searchPath, ERR_NO_SUCH_PATH, openReadEnd);
 
-        /* !!! FIXME: Why aren't we using a for loop here? */
-        i = searchPath;
-
-        do
+        for (i = searchPath; i != NULL; i = i->next)
         {
             char *arcfname = fname;
             if (verifyPath(i, &arcfname, 0))
             {
+                int fileExists = 0;
                 io = i->funcs->openRead(i->opaque, arcfname, &fileExists);
-                if (io)
+                if (io || !fileExists)
                     break;
             } /* if */
-            i = i->next;
-        } while ((i != NULL) && (!fileExists));
+        } /* for */
 
         /* !!! FIXME: may not set an error if openRead didn't fail. */
         GOTO_IF_MACRO(io == NULL, NULL, openReadEnd);
