mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 05:56:03 +01:00
gc: Only track sensible paths from maps file
This commit is contained in:
parent
3839eb15d6
commit
35c7d5d2f1
1 changed files with 5 additions and 2 deletions
|
|
@ -234,9 +234,12 @@ void scanMapsFile(const GlobalOpts & opts, const fs::path & mapsFile, Roots & re
|
|||
std::string line;
|
||||
while (std::getline(mappedFile, line)) {
|
||||
auto match = std::smatch{};
|
||||
if (std::regex_match(line, match, mapRegex))
|
||||
if (std::regex_match(line, match, mapRegex)) {
|
||||
auto matchedPath = fs::path(match[1]);
|
||||
if (isInStore(opts.storeDir, matchedPath))
|
||||
res[fs::path(match[1])].emplace(mapsFile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue