Fixing boost filesystem to work on old installations, too
This commit is contained in:
parent
960b55fd6c
commit
ec7d3a9885
@ -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();
|
||||||
|
|
||||||
|
boost::filesystem::path hsgr_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("hsgrData"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
|
||||||
|
boost::filesystem::path ram_index_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("ramIndex"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
|
||||||
|
boost::filesystem::path file_index_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("fileIndex"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
|
||||||
|
boost::filesystem::path node_data_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("nodesData"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
boost::filesystem::path edge_data_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("edgesData"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
boost::filesystem::path name_data_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("namesData"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
boost::filesystem::path timestamp_path = boost::filesystem::absolute(
|
||||||
|
serverConfig.GetParameter("timestamp"),
|
||||||
|
base_path
|
||||||
|
);
|
||||||
|
|
||||||
objects = new QueryObjectsStorage(
|
objects = new QueryObjectsStorage(
|
||||||
boost::filesystem::canonical(
|
hsgr_path.string(),
|
||||||
serverConfig.GetParameter("hsgrData"),
|
ram_index_path.string(),
|
||||||
base_path, ec ).string(),
|
file_index_path.string(),
|
||||||
boost::filesystem::canonical(
|
node_data_path.string(),
|
||||||
serverConfig.GetParameter("ramIndex"),
|
edge_data_path.string(),
|
||||||
base_path,
|
name_data_path.string(),
|
||||||
ec
|
timestamp_path.string()
|
||||||
).string(),
|
|
||||||
boost::filesystem::canonical(
|
|
||||||
serverConfig.GetParameter("fileIndex"),
|
|
||||||
base_path,
|
|
||||||
ec
|
|
||||||
).string(),
|
|
||||||
boost::filesystem::canonical(
|
|
||||||
serverConfig.GetParameter("nodesData"),
|
|
||||||
base_path,
|
|
||||||
ec ).string(),
|
|
||||||
boost::filesystem::canonical(
|
|
||||||
serverConfig.GetParameter("edgesData"),
|
|
||||||
base_path,
|
|
||||||
ec
|
|
||||||
).string(),
|
|
||||||
boost::filesystem::canonical(
|
|
||||||
serverConfig.GetParameter("namesData"),
|
|
||||||
base_path,
|
|
||||||
ec
|
|
||||||
).string(),
|
|
||||||
boost::filesystem::canonical(
|
|
||||||
serverConfig.GetParameter("timestamp"),
|
|
||||||
base_path,
|
|
||||||
ec
|
|
||||||
).string()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
RegisterPlugin(new HelloWorldPlugin());
|
RegisterPlugin(new HelloWorldPlugin());
|
||||||
|
Loading…
Reference in New Issue
Block a user