aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-04 16:55:42 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-04 16:57:43 +0200
commit293ce52f616f67118df21411bfab66167498bec3 (patch)
treef06c5866fe7043dcb195c592d0e30964dcc069fc
parentd4cccaa8dd4c49eba3d26f078769e72d71c4563d (diff)
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 <david.oberhollenzer@sigma-star.at>
-rw-r--r--lib/sqfs/block_processor/common.c2
1 files changed, 1 insertions, 1 deletions
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)