Trim datasource names before writing to datafile.

This commit is contained in:
Daniel Patterson
2016-05-23 18:10:50 -04:00
committed by Patrick Niklaus
parent 57dbb18c4c
commit 0587c5f5c4
3 changed files with 41 additions and 1 deletions
+5 -1
View File
@@ -624,7 +624,11 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
datasource_stream << "lua profile" << std::endl;
for (auto const &name : segment_speed_filenames)
{
datasource_stream << name << std::endl;
// Only write the filename, without path or extension.
// This prevents information leakage, and keeps names short
// for rendering in the debug tiles.
const boost::filesystem::path p(name);
datasource_stream << p.stem().string() << std::endl;
}
};