# HG changeset patch # User rubidium # Date 1314268295 0 # Node ID eace4d79d5131f5290a1e30e00dd14ca793298d9 # Parent 7a87d9ed25a1b2be90fec2cea1061fe7d4f8251f (svn r22835) -Codechange: keep track of the subdirectory we are looking through in the file scanner diff --git a/src/fileio.cpp b/src/fileio.cpp --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -1317,6 +1317,8 @@ */ uint FileScanner::Scan(const char *extension, Subdirectory sd, bool tars, bool recursive) { + this->subdir = sd; + Searchpath sp; char path[MAX_PATH]; TarFileList::iterator tar; diff --git a/src/fileio_func.h b/src/fileio_func.h --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -67,8 +67,9 @@ extern char *_personal_dir; ///< custom directory for personal settings, saves, newgrf, etc. /** Helper for scanning for files with a given name */ -class FileScanner -{ +class FileScanner { +protected: + Subdirectory subdir; ///< The current sub directory we are searching through public: /** Destruct the proper one... */ virtual ~FileScanner() {}