From a0040bd045e62e1f47852b1e1285fc0f0b34f78d Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 2 Feb 2007 22:45:07 +0100 Subject: [PATCH] Empty final bucket should be turned into a file as well. --- lib/sorter/govern.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sorter/govern.c b/lib/sorter/govern.c index d90dda2a..3606163c 100644 --- a/lib/sorter/govern.c +++ b/lib/sorter/govern.c @@ -180,7 +180,7 @@ sorter_join(struct sort_bucket *b) if (!sbuck_has_file(join)) { - // The final bucket doesn't have any fb associated yet, so replace + // The final bucket doesn't have any file associated yet, so replace // it with the new bucket. SORT_XTRACE("Replaced final bucket"); b->flags |= SBF_FINAL; @@ -300,6 +300,7 @@ sorter_run(struct sort_context *ctx) } sorter_free_buf(ctx); + sbuck_write(bout); // Force empty bucket to a file SORT_XTRACE("Final size: %jd", (uintmax_t) sbuck_size(bout)); ctx->out_fb = sbuck_read(bout); } -- 2.39.2