aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-04 14:50:43 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-04 14:54:07 +0200
commit327b1bf378ebdfe7acc6357b651470b45cb44472 (patch)
tree1dd823cb2da42ab5f814be0fbae15b2d35614c54 /src/libstore/binary-cache-store.cc
parented52cf632bf9db90311014600ca0f042ef57ca20 (diff)
BinaryCacheStore: Explicitly flush file sink
The file sink is also flushed in its destructor, but we ignore any exceptions in the destructor. Issue #3886.
Diffstat (limited to 'src/libstore/binary-cache-store.cc')
-rw-r--r--src/libstore/binary-cache-store.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc
index 3d3195e03..7d103e0cc 100644
--- a/src/libstore/binary-cache-store.cc
+++ b/src/libstore/binary-cache-store.cc
@@ -169,6 +169,7 @@ void BinaryCacheStore::addToStore(const ValidPathInfo & info, Source & narSource
TeeSource teeSource(narSource, *compressionSink);
narAccessor = makeNarAccessor(teeSource);
compressionSink->finish();
+ fileSink.flush();
}
auto now2 = std::chrono::steady_clock::now();