From 5e2ffd0b8a857da3239015d28f3a8b803566aecc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Sep 2012 19:09:01 -0400 Subject: [PATCH] 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(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 93dfd21cc..e94c6b793 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); }