From 5e2ffd0b8a857da3239015d28f3a8b803566aecc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Sep 2012 19:09:01 -0400 Subject: Fix "non-zero padding" error Probably it's not a good idea to pass a temporary object to StringSource. --- src/libstore/build.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstore') 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); } -- cgit 1.4.1