浏览代码

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

fix: compact when dir count hits 0x3ff
Christopher Haster 2 月之前
父节点
当前提交
ed127050bb
共有 1 个文件被更改,包括 1 次插入1 次删除
  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],