# HG changeset patch # User rubidium # Date 1182164652 0 # Node ID abd68dd9c015b5e70361f766c6af6fa24ed337b2 # Parent 0c0e2945c8905431b0d8d6a1584276d33e0faf1a (svn r10198) -Fix (r10194): did not search all search paths. diff -r 0c0e2945c890 -r abd68dd9c015 src/fileio.h --- a/src/fileio.h Mon Jun 18 10:48:15 2007 +0000 +++ b/src/fileio.h Mon Jun 18 11:04:12 2007 +0000 @@ -40,12 +40,13 @@ * Types of searchpaths OpenTTD might use */ enum Searchpath { - SP_WORKING_DIR, ///< Search in the working directory - SP_PERSONAL_DIR, ///< Search in the personal directory - SP_SHARED_DIR, ///< Search in the shared directory, like 'Shared Files' under Windows - SP_BINARY_DIR, ///< Search in the directory where the binary resides - SP_INSTALLATION_DIR, ///< Search in the installation directory - SP_APPLICATION_BUNDLE_DIR, ///< Search within the application bundle + SP_FIRST_DIR, + SP_WORKING_DIR = SP_FIRST_DIR, ///< Search in the working directory + SP_PERSONAL_DIR, ///< Search in the personal directory + SP_SHARED_DIR, ///< Search in the shared directory, like 'Shared Files' under Windows + SP_BINARY_DIR, ///< Search in the directory where the binary resides + SP_INSTALLATION_DIR, ///< Search in the installation directory + SP_APPLICATION_BUNDLE_DIR, ///< Search within the application bundle NUM_SEARCHPATHS }; @@ -70,7 +71,7 @@ } /** Iterator for all the search paths */ -#define FOR_ALL_SEARCHPATHS(sp) for (sp = SP_PERSONAL_DIR; sp < NUM_SEARCHPATHS; sp++) if (IsValidSearchPath(sp)) +#define FOR_ALL_SEARCHPATHS(sp) for (sp = SP_FIRST_DIR; sp < NUM_SEARCHPATHS; sp++) if (IsValidSearchPath(sp)) FILE *FioFOpenFile(const char *filename, const char *mode = "rb", Subdirectory subdir = DATA_DIR); bool FioCheckFileExists(const char *filename, Subdirectory subdir = DATA_DIR);