Fix "path is not in the Nix store" during GC

This commit is contained in:
Eelco Dolstra 2016-04-25 15:42:55 +02:00
parent 697e0b3a6f
commit 9eba2c3945

View file

@ -305,7 +305,7 @@ void LocalStore::findRoots(const Path & path, unsigned char type, Roots & roots)
else if (type == DT_REG) {
Path storePath = settings.nixStore + "/" + baseNameOf(path);
if (isValidPath(storePath))
if (isStorePath(storePath) && isValidPath(storePath))
roots[path] = storePath;
}