summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-07-17 21:41:09 +0000
committermidipix <writeonce@midipix.org>2024-07-17 21:41:09 +0000
commit9644eea648c0c11ac1929cdf23682f43e44b2732 (patch)
tree74653d12e9ff6720613c238e0929799f4f905558
parentf66f5352a25b77e4a930d39e3ba9c260efedf14b (diff)
downloadtpax-9644eea648c0c11ac1929cdf23682f43e44b2732.tar.bz2
tpax-9644eea648c0c11ac1929cdf23682f43e44b2732.tar.xz
tpax_update_cpio_queue_vector(): account for the last array element's c_nlink.
-rw-r--r--src/logic/tpax_queue_vector.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/logic/tpax_queue_vector.c b/src/logic/tpax_queue_vector.c
index 1b10feb..a74cf1f 100644
--- a/src/logic/tpax_queue_vector.c
+++ b/src/logic/tpax_queue_vector.c
@@ -162,6 +162,10 @@ static int tpax_update_cpio_queue_vector(const struct tpax_driver_ctx * dctx)
cpiov++;
}
+ if (nlink > 1)
+ for (idx=2; idx<=nlink; idx++)
+ cpiov[-idx]->nlink = nlink;
+
return 0;
}