Fix root creation when the root already exists but is owned by another user

This commit is contained in:
Eelco Dolstra
2017-10-19 12:28:06 +02:00
parent b904f25247
commit b04dc6c76e
4 changed files with 13 additions and 2 deletions

View File

@ -222,7 +222,7 @@ bool State::getQueuedBuilds(Connection & conn,
BuildOutput res = getBuildOutputCached(conn, destStore, drv);
for (auto & path : drv.outputPaths())
writeFile(rootsDir + "/" + baseNameOf(path), "");
addRoot(path);
{
auto mc = startDbUpdate();