Fix "non-zero padding" error

Probably it's not a good idea to pass a temporary object to
StringSource.
This commit is contained in:
Eelco Dolstra 2012-09-11 19:09:01 -04:00
parent 8cf672091e
commit 5e2ffd0b8a

View file

@ -1332,7 +1332,8 @@ void DerivationGoal::buildDone()
StringSink sink; StringSink sink;
dumpPath(path, sink); dumpPath(path, sink);
deletePath(path); deletePath(path);
StringSource source(rewriteHashes(sink.s, rewritesFromTmp)); sink.s = rewriteHashes(sink.s, rewritesFromTmp);
StringSource source(sink.s);
restorePath(path, source); restorePath(path, source);
} }