don't check for files not actually read

This commit is contained in:
Moritz Kobitzsch 2017-02-15 14:16:38 +01:00 committed by Patrick Niklaus
parent e8cca36369
commit ed7438b9ba

View File

@ -148,10 +148,22 @@ int main(int argc, char *argv[]) try
return EXIT_FAILURE;
}
if (!boost::filesystem::is_regular_file(partition_config.base_path))
auto check_file = [](const boost::filesystem::path &path) {
if (!boost::filesystem::is_regular_file(path))
{
util::Log(logERROR) << "Input file " << path << " not found!";
return false;
}
else
{
return true;
}
};
if (!check_file(partition_config.edge_based_graph_path) ||
!check_file(partition_config.nbg_ebg_mapping_path) ||
!check_file(partition_config.compressed_node_based_graph_path))
{
util::Log(logERROR) << "Input file " << partition_config.base_path.string()
<< " not found!";
return EXIT_FAILURE;
}