From 293ce52f616f67118df21411bfab66167498bec3 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 4 May 2020 16:55:42 +0200 Subject: Fix: propperly set the last block flag if fragments are disabled If a file consisting of multiple blocks is produced, the last block is short and the don't fragment flag is set, the last block flag has to be set on the block when we flush it, so the processing pipeline does it's job correctly. Signed-off-by: David Oberhollenzer --- lib/sqfs/block_processor/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqfs/block_processor/common.c b/lib/sqfs/block_processor/common.c index 2c6e59e..29e117d 100644 --- a/lib/sqfs/block_processor/common.c +++ b/lib/sqfs/block_processor/common.c @@ -317,7 +317,7 @@ int sqfs_block_processor_end_file(sqfs_block_processor_t *proc) if (!(proc->blk_flags & SQFS_BLK_FIRST_BLOCK)) { if (proc->blk_current != NULL && (proc->blk_flags & SQFS_BLK_DONT_FRAGMENT)) { - proc->blk_flags |= SQFS_BLK_LAST_BLOCK; + proc->blk_current->flags |= SQFS_BLK_LAST_BLOCK; } else { err = add_sentinel_block(proc); if (err) -- cgit v1.2.3