Fixing boost filesystem to work on old installations, too

This commit is contained in:
Dennis Luxen 2013-08-01 15:56:18 +02:00
parent 960b55fd6c
commit ec7d3a9885

View File

@ -27,44 +27,49 @@ OSRM::OSRM(const char * server_ini_path) {
BaseConfiguration serverConfig(server_ini_path); BaseConfiguration serverConfig(server_ini_path);
boost::system::error_code ec;
boost::filesystem::path base_path = boost::filesystem::path base_path =
boost::filesystem::absolute(server_ini_path).parent_path(); boost::filesystem::absolute(server_ini_path).parent_path();
objects = new QueryObjectsStorage( boost::filesystem::path hsgr_path = boost::filesystem::absolute(
boost::filesystem::canonical(
serverConfig.GetParameter("hsgrData"), serverConfig.GetParameter("hsgrData"),
base_path, ec ).string(), base_path
boost::filesystem::canonical( );
boost::filesystem::path ram_index_path = boost::filesystem::absolute(
serverConfig.GetParameter("ramIndex"), serverConfig.GetParameter("ramIndex"),
base_path, base_path
ec );
).string(),
boost::filesystem::canonical( boost::filesystem::path file_index_path = boost::filesystem::absolute(
serverConfig.GetParameter("fileIndex"), serverConfig.GetParameter("fileIndex"),
base_path, base_path
ec );
).string(),
boost::filesystem::canonical( boost::filesystem::path node_data_path = boost::filesystem::absolute(
serverConfig.GetParameter("nodesData"), serverConfig.GetParameter("nodesData"),
base_path, base_path
ec ).string(), );
boost::filesystem::canonical( boost::filesystem::path edge_data_path = boost::filesystem::absolute(
serverConfig.GetParameter("edgesData"), serverConfig.GetParameter("edgesData"),
base_path, base_path
ec );
).string(), boost::filesystem::path name_data_path = boost::filesystem::absolute(
boost::filesystem::canonical(
serverConfig.GetParameter("namesData"), serverConfig.GetParameter("namesData"),
base_path, base_path
ec );
).string(), boost::filesystem::path timestamp_path = boost::filesystem::absolute(
boost::filesystem::canonical(
serverConfig.GetParameter("timestamp"), serverConfig.GetParameter("timestamp"),
base_path, base_path
ec );
).string()
objects = new QueryObjectsStorage(
hsgr_path.string(),
ram_index_path.string(),
file_index_path.string(),
node_data_path.string(),
edge_data_path.string(),
name_data_path.string(),
timestamp_path.string()
); );
RegisterPlugin(new HelloWorldPlugin()); RegisterPlugin(new HelloWorldPlugin());