mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r22835) -Codechange: keep track of the subdirectory we are looking through in the file scanner
This commit is contained in:
parent
41169291e3
commit
672df52e0c
|
@ -1317,6 +1317,8 @@ static uint ScanTar(FileScanner *fs, const char *extension, TarFileList::iterato
|
||||||
*/
|
*/
|
||||||
uint FileScanner::Scan(const char *extension, Subdirectory sd, bool tars, bool recursive)
|
uint FileScanner::Scan(const char *extension, Subdirectory sd, bool tars, bool recursive)
|
||||||
{
|
{
|
||||||
|
this->subdir = sd;
|
||||||
|
|
||||||
Searchpath sp;
|
Searchpath sp;
|
||||||
char path[MAX_PATH];
|
char path[MAX_PATH];
|
||||||
TarFileList::iterator tar;
|
TarFileList::iterator tar;
|
||||||
|
|
|
@ -67,8 +67,9 @@ bool ExtractTar(const char *tar_filename);
|
||||||
extern char *_personal_dir; ///< custom directory for personal settings, saves, newgrf, etc.
|
extern char *_personal_dir; ///< custom directory for personal settings, saves, newgrf, etc.
|
||||||
|
|
||||||
/** Helper for scanning for files with a given name */
|
/** 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:
|
public:
|
||||||
/** Destruct the proper one... */
|
/** Destruct the proper one... */
|
||||||
virtual ~FileScanner() {}
|
virtual ~FileScanner() {}
|
||||||
|
|
Loading…
Reference in New Issue