1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-12 05:26:02 +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

@ -191,7 +191,7 @@ void unix::closeExtraFDs()
#ifdef __linux__
try {
for (auto & s : std::filesystem::directory_iterator{"/proc/self/fd"}) {
for (auto & s : DirectoryIterator{"/proc/self/fd"}) {
checkInterrupt();
auto fd = std::stoi(s.path().filename());
if (fd > MAX_KEPT_FD) {
@ -201,7 +201,6 @@ void unix::closeExtraFDs()
}
return;
} catch (SysError &) {
} catch (std::filesystem::filesystem_error &) {
}
#endif