summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;