about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-11T23·09-0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-09-11T23·09-0400
commit5e2ffd0b8a857da3239015d28f3a8b803566aecc (patch)
tree8e440493f86c483ae2e8c656b8d3cd7443176a3b
parent8cf672091eb93fea5496aca2655436413f4d3c66 (diff)
Fix "non-zero padding" error
Probably it's not a good idea to pass a temporary object to
StringSource.
-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);
             }