Merge remote-tracking branch 'upstream/master'

actorid
Nikolay Kasyanov 13 years ago
commit 3875c0f97a

@ -188,8 +188,7 @@ 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…
Cancel
Save