On 11/25/21 6:45 AM, Miklos Szeredi wrote: > On Tue, 23 Nov 2021 at 19:10, Stefan Roesch <shr@xxxxxx> wrote: >> >> This adds the use_fpos parameter to the iterate_dir function. >> If use_fpos is true it uses the file position in the file >> structure (existing behavior). If use_fpos is false, it uses >> the pos in the context structure. > > Is there a reason not to introduce a iterate_dir_no_fpos() variant and > call this from iterate_dir() with the necessary fpos update? > This would cause some code duplication. With the next version of the patch I'll keep the current function of iterate_dir and introduce a new do_iterate_dir function that has the use_fpos parameter. With that change the function signature of iterate_dir does not change and iterate_dir will call do_iterate_dir. > Thanks, > Miklos >