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:
parent
7ccc0d591f
commit
1c4496f4e5
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