mirror of
https://github.com/NixOS/nix.git
synced 2025-11-24 19:29:36 +01: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
|
|
@ -34,12 +34,12 @@ std::pair<Generations, std::optional<GenerationNumber>> findGenerations(Path pro
|
|||
{
|
||||
Generations gens;
|
||||
|
||||
Path profileDir = dirOf(profile);
|
||||
std::filesystem::path profileDir = dirOf(profile);
|
||||
auto profileName = std::string(baseNameOf(profile));
|
||||
|
||||
for (auto & i : readDirectory(profileDir)) {
|
||||
if (auto n = parseName(profileName, i.name)) {
|
||||
auto path = profileDir + "/" + i.name;
|
||||
for (auto & i : readDirectory(profileDir.string())) {
|
||||
if (auto n = parseName(profileName, i.path().filename().string())) {
|
||||
auto path = i.path().string();
|
||||
gens.push_back({
|
||||
.number = *n,
|
||||
.path = path,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue