|
|
@ -1,5 +1,6 @@
|
|
|
|
#include "registerarchives.hpp"
|
|
|
|
#include "registerarchives.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <iostream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <sstream>
|
|
|
|
#include <sstream>
|
|
|
|
|
|
|
|
|
|
|
@ -33,12 +34,20 @@ namespace VFS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (useLooseFiles)
|
|
|
|
if (useLooseFiles)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::set<boost::filesystem::path> seen;
|
|
|
|
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
|
|
|
|
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::cout << "Adding data directory " << iter->string() << std::endl;
|
|
|
|
if (seen.insert(*iter).second)
|
|
|
|
// Last data dir has the highest priority
|
|
|
|
{
|
|
|
|
vfs->addArchive(new FileSystemArchive(iter->string()));
|
|
|
|
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();
|
|
|
|
vfs->buildIndex();
|
|
|
|
}
|
|
|
|
}
|
|
|
|