summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-16 16:14:01 +0000
committerrubidium <rubidium@openttd.org>2009-01-16 16:14:01 +0000
commit2adcaa576fd0e69205fdb96b453b80eed33c2cbb (patch)
treec0af64620e666fbb5a061b5362af25f1da26068c
parent3db8b544ba47d683b9bd50efcad402045fef312c (diff)
downloadopenttd-2adcaa576fd0e69205fdb96b453b80eed33c2cbb.tar.xz
(svn r15111) -Fix: when scanning a path and saying it should ignore tars, it didn't do so
-rw-r--r--src/fileio.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp
index fc60dfebe..5940d021f 100644
--- a/src/fileio.cpp
+++ b/src/fileio.cpp
@@ -1087,8 +1087,11 @@ uint FileScanner::Scan(const char *extension, Subdirectory sd, bool tars)
FioAppendDirectory(path, MAX_PATH, sp, sd);
num += ScanPath(this, extension, path, strlen(path));
}
- FOR_ALL_TARS(tar) {
- num += ScanTar(this, extension, tar);
+
+ if (tars) {
+ FOR_ALL_TARS(tar) {
+ num += ScanTar(this, extension, tar);
+ }
}
return num;