mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-10-14 02:43:30 +08:00
Merge pull request #1137 from dschendt/dschendt-fix-dir-count
fix: compact when dir count hits 0x3ff
This commit is contained in:
2
lfs.c
2
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
|
// try to commit
|
||||||
struct lfs_commit commit = {
|
struct lfs_commit commit = {
|
||||||
.block = dir->pair[0],
|
.block = dir->pair[0],
|
||||||
|
Reference in New Issue
Block a user