Cleanup gcroots creation.
This commit is contained in:
parent
8dd6426d15
commit
7aa9835adb
|
@ -264,8 +264,6 @@ static void worker(
|
|||
if (auto drvInfo = getDerivation(state, *v, false)) {
|
||||
|
||||
auto drv = Drv(state, *drvInfo);
|
||||
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
|
||||
auto storePath = localStore->parseStorePath(drv.drvPath);
|
||||
|
||||
reply = drv;
|
||||
reply["attr"] = attrPath;
|
||||
|
@ -275,9 +273,12 @@ static void worker(
|
|||
done. */
|
||||
if (myArgs.gcRootsDir != "") {
|
||||
Path root = myArgs.gcRootsDir + "/" + std::string(baseNameOf(drv.drvPath));
|
||||
if (!pathExists(root))
|
||||
if (!pathExists(root)) {
|
||||
auto localStore = state.store.dynamic_pointer_cast<LocalFSStore>();
|
||||
auto storePath = localStore->parseStorePath(drv.drvPath);
|
||||
localStore->addPermRoot(storePath, root);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue