diff options
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/tests/proton/index/diskindexcleaner_test.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp b/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp index 1be97e3c981..c2ac107ad42 100644 --- a/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp +++ b/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp @@ -65,10 +65,9 @@ vector<string> readIndexes() { vector<string> indexes; std::filesystem::directory_iterator dir_scan(index_dir); for (auto entry : dir_scan) { - if (!entry.is_directory() || entry.path().filename().string().find("index.") != 0) { - continue; + if (entry.is_directory() && entry.path().filename().string().find("index.") == 0) { + indexes.push_back(entry.path().filename().string()); } - indexes.push_back(entry.path().filename().string()); } return indexes; } |