further fixes
This commit is contained in:
@@ -115,6 +115,7 @@ std::error_code kitti_loader::load(
|
||||
continue;
|
||||
}
|
||||
|
||||
// TODO find out if the path splitting is consistent
|
||||
const auto base_directory = parent_directory(file.substr(0, sep_index));
|
||||
if (not base_directory) [[unlikely]]
|
||||
{
|
||||
@@ -162,14 +163,12 @@ std::error_code kitti_loader::load(
|
||||
{
|
||||
const auto file_path = std::string_view{ file.path().c_str() };
|
||||
|
||||
const auto extension_begin = file_path.rfind('.');
|
||||
|
||||
if (extension_begin == std::string_view::npos or file_path.substr(extension_begin) != ".bin")
|
||||
if (not file_path.ends_with(".bin"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
auto filename_begin = file_path.rfind(fs::path::preferred_separator, extension_begin);
|
||||
auto filename_begin = file_path.rfind(fs::path::preferred_separator);
|
||||
filename_begin = filename_begin == std::string_view::npos ? 0 : filename_begin + 1;
|
||||
|
||||
const auto filename_only = file_path.substr(filename_begin);
|
||||
|
||||
Reference in New Issue
Block a user