mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
Don’t fail when the store contains some invalid paths
This commit is contained in:
parent
f3b9d3fd88
commit
8f622ff71b
1 changed files with 6 additions and 3 deletions
|
|
@ -341,9 +341,12 @@ Roots LocalStore::findRoots(bool censor)
|
|||
throw Error("Invalid result from the gc helper");
|
||||
auto rawDestPath = parsedLine[0];
|
||||
if (!isInStore(rawDestPath)) continue;
|
||||
try {
|
||||
auto destPath = toStorePath(rawDestPath).first;
|
||||
if (!isValidPath(destPath)) continue;
|
||||
roots[destPath].insert(parsedLine[1]);
|
||||
} catch (Error &) {
|
||||
}
|
||||
}
|
||||
} catch (EndOfFile &) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue