forked from teamnwah/openmw-tes3coop
Ignore duplicate data directories to work around the fallout of (Fixes #3557)
This commit is contained in:
parent
80f7279a4d
commit
047c44f265
1 changed files with 12 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "registerarchives.hpp"
|
||||
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
|
@ -33,12 +34,20 @@ namespace VFS
|
|||
}
|
||||
|
||||
if (useLooseFiles)
|
||||
{
|
||||
std::set<boost::filesystem::path> seen;
|
||||
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
|
||||
{
|
||||
std::cout << "Adding data directory " << iter->string() << std::endl;
|
||||
// Last data dir has the highest priority
|
||||
vfs->addArchive(new FileSystemArchive(iter->string()));
|
||||
if (seen.insert(*iter).second)
|
||||
{
|
||||
std::cout << "Adding data directory " << iter->string() << std::endl;
|
||||
// Last data dir has the highest priority
|
||||
vfs->addArchive(new FileSystemArchive(iter->string()));
|
||||
}
|
||||
else
|
||||
std::cerr << "Ignoring duplicate data directory " << iter->string() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
vfs->buildIndex();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue