Skip to content

Commit

Permalink
osx-specific directoryList function
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Nov 9, 2022
1 parent f8741c6 commit 66cafb7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion epf/Epf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,19 @@ std::vector<std::string> directoryList(const std::string& dir)
dpdf = opendir(dir.c_str());
if (dpdf != NULL){
while ((epdf = readdir(dpdf))){
files.push_back(untwine::fromNative(epdf->d_name));
std::string name = untwine::fromNative(epdf->d_name);
// Skip paths
if (pdal::Utils::iequals(name, ".") ||
pdal::Utils::iequals(name, ".."))
{
continue;
}
else
{
// we expect the path + name
std::string p = dir + "/" + untwine::fromNative(epdf->d_name);
files.push_back(p);
}
}
}
closedir(dpdf);
Expand Down

0 comments on commit 66cafb7

Please sign in to comment.