Skip to content

Commit 3c610df

Browse files
committed
Delete scratch data for CA derivation that produced already-extant output
In the case where the store object doesn't exist, we do correctly move (rather than copy) the scratch data into place. In this case, the destination store object already exists, but we still want to clean up after ourselves.
1 parent 3bf1268 commit 3c610df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libstore/unix/build/derivation-builder.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,8 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
17121712
/* Path already exists because CA path produced by something
17131713
else. No moving needed. */
17141714
assert(newInfo.ca);
1715+
/* Can delete our scratch copy now. */
1716+
deletePath(actualPath);
17151717
} else {
17161718
auto destPath = store.toRealPath(finalDestPath);
17171719
deletePath(destPath);

0 commit comments

Comments
 (0)