Add missing files in exception message (#5360)

This commit is contained in:
Rafael Guglielmetti
2022-08-22 08:32:25 +02:00
committed by GitHub
parent 7f014bd616
commit e3c7995b00
4 changed files with 25 additions and 4 deletions
+16 -2
View File
@@ -10,10 +10,11 @@ namespace osrm
{
namespace storage
{
namespace fs = boost::filesystem;
bool IOConfig::IsValid() const
{
namespace fs = boost::filesystem;
bool success = true;
for (auto &fileName : required_input_files)
{
@@ -26,5 +27,18 @@ bool IOConfig::IsValid() const
}
return success;
}
std::vector<std::string> IOConfig::GetMissingFiles() const
{
std::vector<std::string> missingFiles;
for (auto &fileName : required_input_files)
{
if (!fs::is_regular_file(fs::path(base_path.string() + fileName.string())))
{
missingFiles.push_back(base_path.string() + fileName.string());
}
}
return missingFiles;
}
} // namespace storage
} // namespace osrm