Skip to content
Snippets Groups Projects
Commit 85d738b7 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

file utils: use std::error_code with directory_iterator

Change-Id: I7095ee9fe978dde6ce9b0c45f50e4302240c01df
parent f7abf971
No related branches found
No related tags found
No related merge requests found
......@@ -338,7 +338,8 @@ removeAll(const std::filesystem::path& path, bool erase)
auto status = std::filesystem::status(path);
if (std::filesystem::is_directory(status) and not std::filesystem::is_symlink(status)) {
for (const auto& entry: std::filesystem::directory_iterator(path)) {
std::error_code ec;
for (const auto& entry: std::filesystem::directory_iterator(path, ec)) {
removeAll(entry.path(), erase);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment