mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Abort on duplicate content file
This commit is contained in:
parent
4727ae4b3b
commit
04e9b6d242
1 changed files with 9 additions and 0 deletions
|
@ -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...";
|
Log(Debug::Error) << "No content file given (esm/esp, nor omwgame/omwaddon). Aborting...";
|
||||||
return false;
|
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)
|
for (auto& file : content)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue