Skip to content

Commit 0a8dc9f

Browse files
committed
enumattr callback returns false to stop enumeration
1 parent 4dd4054 commit 0a8dc9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lfs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3964,7 +3964,9 @@ static int lfs_enumattr_(lfs_t* lfs, const char* path,
39643964
return err;
39653965
}
39663966

3967-
callback(e, attrnum, lfs_tag_size(tag));
3967+
if(!callback(e, attrnum, lfs_tag_size(tag))) {
3968+
break;
3969+
}
39683970
++count;
39693971
}
39703972

0 commit comments

Comments
 (0)