about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 93dfd21ccec2..e94c6b7939ed 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1332,7 +1332,8 @@ void DerivationGoal::buildDone()
                 StringSink sink;
                 dumpPath(path, sink);
                 deletePath(path);
-                StringSource source(rewriteHashes(sink.s, rewritesFromTmp));
+                sink.s = rewriteHashes(sink.s, rewritesFromTmp);
+                StringSource source(sink.s);
                 restorePath(path, source);
             }