diff --git a/source/common/initfs.cpp b/source/common/initfs.cpp index 8db571bd7..32664b920 100644 --- a/source/common/initfs.cpp +++ b/source/common/initfs.cpp @@ -386,11 +386,14 @@ void InitFileSystem(TArray& groups) todelete.Append(userConfig.toBeDeleted); fileSystem.InitMultipleFiles(Files, todelete, groups.Size()); - FILE* f = fopen("filesystem.dir", "wb"); - for (int i = 0; i < fileSystem.GetNumEntries(); i++) + if (Args->CheckParm("-dumpfs")) { - auto fd = fileSystem.GetFileAt(i); - fprintf(f, "%.50s %60s %d\n", fd->FullName(), fileSystem.GetResourceFileFullName(fileSystem.GetFileContainer(i)), fd->Size()); + FILE* f = fopen("filesystem.dir", "wb"); + for (int i = 0; i < fileSystem.GetNumEntries(); i++) + { + auto fd = fileSystem.GetFileAt(i); + fprintf(f, "%.50s %60s %d\n", fd->FullName(), fileSystem.GetResourceFileFullName(fileSystem.GetFileContainer(i)), fd->Size()); + } + fclose(f); } - fclose(f); }