mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02: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
|
@ -387,7 +387,7 @@ void recursiveSync(const Path & path)
|
|||
while (!dirsToEnumerate.empty()) {
|
||||
auto currentDir = dirsToEnumerate.back();
|
||||
dirsToEnumerate.pop_back();
|
||||
for (auto & entry : std::filesystem::directory_iterator(currentDir)) {
|
||||
for (auto & entry : DirectoryIterator(currentDir)) {
|
||||
auto st = entry.symlink_status();
|
||||
if (fs::is_directory(st)) {
|
||||
dirsToEnumerate.emplace_back(entry.path());
|
||||
|
@ -691,7 +691,7 @@ void copyFile(const fs::path & from, const fs::path & to, bool andDelete)
|
|||
fs::copy(from, to, fs::copy_options::copy_symlinks | fs::copy_options::overwrite_existing);
|
||||
} else if (fs::is_directory(fromStatus)) {
|
||||
fs::create_directory(to);
|
||||
for (auto & entry : fs::directory_iterator(from)) {
|
||||
for (auto & entry : DirectoryIterator(from)) {
|
||||
copyFile(entry, to / entry.path().filename(), andDelete);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue