OSDN Git Service

Fix file contiguous judgement.
authornoctis <noctis.AKM@gmail.com>
Sun, 19 Aug 2018 10:07:19 +0000 (18:07 +0800)
committerrelan <relan@users.noreply.github.com>
Mon, 4 May 2020 15:49:27 +0000 (18:49 +0300)
Signed-off-by: noctis <noctis.AKM@gmail.com>
libexfat/cluster.c

index 15cd9aa..66f808f 100644 (file)
@@ -280,7 +280,7 @@ static int grow_file(struct exfat* ef, struct exfat_node* node,
                                shrink_file(ef, node, current + allocated, allocated);
                        return -ENOSPC;
                }
-               if (next != previous - 1 && node->is_contiguous)
+               if (next != previous + 1 && node->is_contiguous)
                {
                        /* it's a pity, but we are not able to keep the file contiguous
                           anymore */