1
0
Fork 0
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:
John Ericson 2024-05-07 11:29:33 -04:00
parent c371070580
commit a3c573950b
18 changed files with 52 additions and 59 deletions

View file

@ -84,11 +84,12 @@ protected:
StorePathSet paths;
for (auto & entry : readDirectory(binaryCacheDir)) {
if (entry.name.size() != 40 ||
!hasSuffix(entry.name, ".narinfo"))
auto name = entry.path().filename().string();
if (name.size() != 40 ||
!hasSuffix(name, ".narinfo"))
continue;
paths.insert(parseStorePath(
storeDir + "/" + entry.name.substr(0, entry.name.size() - 8)
storeDir + "/" + name.substr(0, name.size() - 8)
+ "-" + MissingName));
}