mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Abort on duplicate content file
This commit is contained in:
parent
4727ae4b3b
commit
04e9b6d242
@ -199,6 +199,15 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
|
||||
Log(Debug::Error) << "No content file given (esm/esp, nor omwgame/omwaddon). Aborting...";
|
||||
return false;
|
||||
}
|
||||
std::set<std::string> contentDedupe;
|
||||
for (const auto& contentFile : content)
|
||||
{
|
||||
if (!contentDedupe.insert(contentFile).second)
|
||||
{
|
||||
Log(Debug::Error) << "Content file specified more than once: " << contentFile << ". Aborting...";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& file : content)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user