mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Replace our DirEntry
with std::filesystem
's
This commit is contained in:
parent
c371070580
commit
a3c573950b
18 changed files with 52 additions and 59 deletions
|
@ -30,8 +30,8 @@ void removeOldGenerations(std::string dir)
|
|||
for (auto & i : readDirectory(dir)) {
|
||||
checkInterrupt();
|
||||
|
||||
auto path = dir + "/" + i.name;
|
||||
auto type = i.type == std::filesystem::file_type::unknown ? getFileType(path) : i.type;
|
||||
auto path = i.path().string();
|
||||
auto type = i.symlink_status().type();
|
||||
|
||||
if (type == std::filesystem::file_type::symlink && canWrite) {
|
||||
std::string link;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue