]> mj.ucw.cz Git - libucw.git/commitdiff
Honor SORT_DEBUG_KEEP_BUCKETS when swapping in a bucket.
authorMartin Mares <mj@ucw.cz>
Mon, 17 Sep 2007 20:06:05 +0000 (22:06 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 17 Sep 2007 20:06:05 +0000 (22:06 +0200)
lib/sorter/sbuck.c

index 7f19f31ef937d1ede7fd98140105c678e4a008e3..c6ebdeef3252af50f31d14b7100a81430225bcef 100644 (file)
@@ -72,7 +72,8 @@ sbuck_swap_in(struct sort_bucket *b)
       b->fb = bopen_file(b->filename, O_RDWR, b->ctx->fb_params);
       if (b->flags & SBF_OPEN_WRITE)
        bseek(b->fb, 0, SEEK_END);
-      bconfig(b->fb, BCONFIG_IS_TEMP_FILE, 1);
+      if (!(sorter_debug & SORT_DEBUG_KEEP_BUCKETS))
+       bconfig(b->fb, BCONFIG_IS_TEMP_FILE, 1);
       b->flags &= ~SBF_SWAPPED_OUT;
       SORT_XTRACE(3, "Swapped in %s", b->filename);
     }