Browse Source

Merge pull request #1137 from dschendt/dschendt-fix-dir-count

fix: compact when dir count hits 0x3ff
Christopher Haster 2 months ago
parent
commit
ed127050bb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lfs.c

+ 1 - 1
lfs.c

@@ -2268,7 +2268,7 @@ static int lfs_dir_relocatingcommit(lfs_t *lfs, lfs_mdir_t *dir,
         }
     }
 
-    if (dir->erased) {
+    if (dir->erased && dir->count < 0xff) {
         // try to commit
         struct lfs_commit commit = {
             .block = dir->pair[0],