mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
3875c0f97a
3 changed files with 20 additions and 4 deletions
|
@ -188,7 +188,6 @@ void DataFilesPage::setupDataFiles()
|
||||||
|
|
||||||
// Put the paths in a boost::filesystem vector to use with Files::Collections
|
// Put the paths in a boost::filesystem vector to use with Files::Collections
|
||||||
Files::PathContainer dataDirs(variables["data"].as<Files::PathContainer>());
|
Files::PathContainer dataDirs(variables["data"].as<Files::PathContainer>());
|
||||||
mCfgMgr.processPaths(dataDirs);
|
|
||||||
|
|
||||||
std::string local(variables["data-local"].as<std::string>());
|
std::string local(variables["data-local"].as<std::string>());
|
||||||
if (!local.empty())
|
if (!local.empty())
|
||||||
|
@ -201,6 +200,8 @@ void DataFilesPage::setupDataFiles()
|
||||||
dataDirs.push_back(mCfgMgr.getLocalPath());
|
dataDirs.push_back(mCfgMgr.getLocalPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mCfgMgr.processPaths(dataDirs);
|
||||||
|
|
||||||
// Create a file collection for the dataDirs
|
// Create a file collection for the dataDirs
|
||||||
Files::Collections fileCollections(dataDirs, !variables["fs-strict"].as<bool>());
|
Files::Collections fileCollections(dataDirs, !variables["fs-strict"].as<bool>());
|
||||||
|
|
||||||
|
|
|
@ -246,8 +246,6 @@ void OMW::Engine::enableFSStrict(bool fsStrict)
|
||||||
|
|
||||||
void OMW::Engine::setDataDirs (const Files::PathContainer& dataDirs)
|
void OMW::Engine::setDataDirs (const Files::PathContainer& dataDirs)
|
||||||
{
|
{
|
||||||
/// \todo remove mDataDir, once resources system can handle multiple directories
|
|
||||||
assert (!dataDirs.empty());
|
|
||||||
mDataDirs = dataDirs;
|
mDataDirs = dataDirs;
|
||||||
mFileCollections = Files::Collections (dataDirs, !mFSStrict);
|
mFileCollections = Files::Collections (dataDirs, !mFSStrict);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,23 @@
|
||||||
|
|
||||||
#include "config.hpp"
|
#include "config.hpp"
|
||||||
|
|
||||||
|
#include <boost/version.hpp>
|
||||||
|
/**
|
||||||
|
* Workaround for problems with whitespaces in paths in older versions of Boost library
|
||||||
|
*/
|
||||||
|
#if (BOOST_VERSION <= 104600)
|
||||||
|
namespace boost
|
||||||
|
{
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline boost::filesystem::path lexical_cast<boost::filesystem::path, std::string>(const std::string& arg)
|
||||||
|
{
|
||||||
|
return boost::filesystem::path(arg);
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* namespace boost */
|
||||||
|
#endif /* (BOOST_VERSION <= 104600) */
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue