From 4825d66e10820fad370456a89f8731b717b7e587 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 10 Jan 2020 21:54:18 +0100 Subject: [PATCH] - make file system directory printout optional. --- source/common/initfs.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); }