- const auto filename(i.path().filename().native());
- if ((!boost::filesystem::is_directory(i.path())) &&
- (filename[0] != '.') &&
- (boost::algorithm::ends_with(filename, ".json")))
- paths.push_back(i.path().native());
+ if ((diread->d_type == DT_REG) &&
+ (diread->d_name[0] != '.') &&
+ (boost::algorithm::ends_with(diread->d_name, ".json")))
+ paths.push_back(std::string(diread->d_name));