1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

replace all instances of std::filesystem::directory_iterator with DirectoryIterator

This commit is contained in:
Jörg Thalheim 2025-05-01 09:54:14 +02:00
parent 7ccc0d591f
commit 1c4496f4e5
16 changed files with 55 additions and 64 deletions

View file

@ -6,6 +6,7 @@
#include "nix/util/config-global.hh"
#include "nix/util/signals.hh"
#include "nix/util/file-system.hh"
namespace nix {
@ -77,13 +78,13 @@ void initPlugins()
for (const auto & pluginFile : pluginSettings.pluginFiles.get()) {
std::vector<std::filesystem::path> pluginFiles;
try {
auto ents = std::filesystem::directory_iterator{pluginFile};
auto ents = DirectoryIterator{pluginFile};
for (const auto & ent : ents) {
checkInterrupt();
pluginFiles.emplace_back(ent.path());
}
} catch (std::filesystem::filesystem_error & e) {
if (e.code() != std::errc::not_a_directory)
} catch (SysError & e) {
if (e.errNo != ENOTDIR)
throw;
pluginFiles.emplace_back(pluginFile);
}