diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index cfcda1311..8837ac25d 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -530,7 +530,9 @@ void LocalDerivationGoal::startBuilder() /* Schedule this scratch output path for automatic deletion * if we do not cancel it, e.g. when registering the outputs. */ - scratchOutputsCleaner.insert_or_assign(outputName, worker.store.printStorePath(scratchPath)); + scratchOutputsCleaner.emplace( + outputName, worker.store.toRealPath(worker.store.printStorePath(scratchPath)) + ); /* Substitute output placeholders with the scratch output paths. We'll use during the build. */