Skip to content

Commit ed12705

Browse files
authored
Merge pull request #1137 from dschendt/dschendt-fix-dir-count
fix: compact when dir count hits 0x3ff
2 parents ec26996 + 4cd2bfc commit ed12705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ static int lfs_dir_relocatingcommit(lfs_t *lfs, lfs_mdir_t *dir,
22682268
}
22692269
}
22702270

2271-
if (dir->erased) {
2271+
if (dir->erased && dir->count < 0xff) {
22722272
// try to commit
22732273
struct lfs_commit commit = {
22742274
.block = dir->pair[0],

0 commit comments

Comments
 (0)