From 28d9fe68ae7edeebfe7424f2c27ca948ecad0299 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Thu, 17 Feb 2022 01:05:30 -0500 Subject: [PATCH] - add duplication checking to file list, prevent loading the same file twice unless explicitly asked by the user --- src/common/filesystem/filesystem.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/common/filesystem/filesystem.cpp b/src/common/filesystem/filesystem.cpp index 6e3bea388..61c947c7a 100644 --- a/src/common/filesystem/filesystem.cpp +++ b/src/common/filesystem/filesystem.cpp @@ -216,6 +216,19 @@ void FileSystem::InitMultipleFiles (TArray &filenames, bool quiet, Lump DeleteAll(); numfiles = 0; + // first, check for duplicates + if (!Args->CheckParm("-allowduplicates")) + { + for (unsigned i=0;i