mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 23:42:43 +01:00
replace all instances of std::filesystem::directory_iterator with DirectoryIterator
(cherry picked from commit 1c4496f4e5)
This commit is contained in:
parent
0f4b17e51f
commit
3d8d19928e
16 changed files with 55 additions and 64 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue