mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 16:29:36 +01:00
inline the usage of nix::readDirectory
`nix::readDirectory` is removed. `std::filesystem::directory_iterator` is used directly in places that used this util.
This commit is contained in:
parent
87ab3c0ea4
commit
1db7d1b840
18 changed files with 26 additions and 44 deletions
|
|
@ -17,10 +17,10 @@ struct State
|
|||
/* For each activated package, create symlinks */
|
||||
static void createLinks(State & state, const Path & srcDir, const Path & dstDir, int priority)
|
||||
{
|
||||
std::vector<std::filesystem::directory_entry> srcFiles;
|
||||
std::filesystem::directory_iterator srcFiles;
|
||||
|
||||
try {
|
||||
srcFiles = readDirectory(srcDir);
|
||||
srcFiles = std::filesystem::directory_iterator{srcDir};
|
||||
} catch (std::filesystem::filesystem_error & e) {
|
||||
if (e.code() == std::errc::not_a_directory) {
|
||||
warn("not including '%s' in the user environment because it's not a directory", srcDir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue