From: Martin Mares Date: Fri, 2 Feb 2007 21:45:07 +0000 (+0100) Subject: Empty final bucket should be turned into a file as well. X-Git-Tag: holmes-import~506^2~13^2~172 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=a0040bd045e62e1f47852b1e1285fc0f0b34f78d;p=libucw.git Empty final bucket should be turned into a file as well. --- 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); }