Skip to content

Commit

Permalink
Switch glob::glob to use ghc::filesystem.
Browse files Browse the repository at this point in the history
Closes #52.
  • Loading branch information
rsmmr committed Oct 31, 2022
1 parent 06905ff commit bdb1df6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ add_subdirectory(json EXCLUDE_FROM_ALL)
add_subdirectory(stduuid EXCLUDE_FROM_ALL)
add_subdirectory(tomlplusplus EXCLUDE_FROM_ALL)
add_subdirectory(out_ptr EXCLUDE_FROM_ALL)

option(GLOB_USE_GHC_FILESYSTEM "Use ghc::filesystem instead of std::filesystem" ON)
add_subdirectory(glob EXCLUDE_FROM_ALL)

set(SPDLOG_FMT_EXTERNAL ON)
Expand Down
6 changes: 1 addition & 5 deletions src/util/helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ std::vector<filesystem::path> zeek::agent::glob(const filesystem::path& pattern,
if ( paths.size() > max )
paths.resize(max);

std::vector<filesystem::path> ret;
for ( const auto& path : paths )
ret.emplace_back(path.string());

return ret;
return paths;
}

TEST_SUITE("Helpers") {
Expand Down

0 comments on commit bdb1df6

Please sign in to comment.