소스 검색

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],