diff options
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp index e4a4e6761aa..a535d180622 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp @@ -17,7 +17,6 @@ #include <vespa/config-summary.h> #include <vespa/searchsummary/config/config-juniperrc.h> #include <vespa/config/helper/configgetter.hpp> -#include <vespa/fastos/file.h> #include <filesystem> #include <sstream> #include <cassert> @@ -193,12 +192,9 @@ std::vector<vespalib::string> getFileList(const vespalib::string &snapDir) { std::vector<vespalib::string> res; - FastOS_DirectoryScan dirScan(snapDir.c_str()); - while (dirScan.ReadNext()) { - if (strcmp(dirScan.GetName(), ".") == 0 || - strcmp(dirScan.GetName(), "..") == 0) - continue; - res.push_back(dirScan.GetName()); + std::filesystem::directory_iterator dir_scan{std::filesystem::path(snapDir)}; + for (auto& entry : dir_scan) { + res.emplace_back(entry.path().filename().string()); } std::sort(res.begin(), res.end()); return res; |