Skip to content

Commit

Permalink
add ec
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Feb 10, 2024
1 parent 3fa0f9c commit 00b0d50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/cinatra/coro_http_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,12 @@ class coro_http_server {
}

files_.clear();
std::error_code ec;
for (const auto &file :
std::filesystem::recursive_directory_iterator(static_dir_)) {
std::filesystem::recursive_directory_iterator(static_dir_, ec)) {
if (ec) {
continue;
}
if (!file.is_directory()) {
files_.push_back(file.path().string());
}
Expand Down

0 comments on commit 00b0d50

Please sign in to comment.