Skip to content

Commit 1f032a9

Browse files
authored
Update ggml/src/ggml-backend-reg.cpp
1 parent f17d2c7 commit 1f032a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ggml/src/ggml-backend-reg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ static ggml_backend_reg_t ggml_backend_load_best(const char * name, bool silent,
473473
if (!fs::exists(search_path)) {
474474
continue;
475475
}
476-
for (const auto & entry : fs::directory_iterator(search_path,
477-
std::filesystem::directory_options::skip_permission_denied)) {
476+
fs::directory_iterator dir_it(search_path, fs::directory_options::skip_permission_denied);
477+
for (const auto & entry : dir_it) {
478478
if (entry.is_regular_file()) {
479479
std::string filename = entry.path().filename().string();
480480
std::string ext = entry.path().extension().string();

0 commit comments

Comments
 (0)