pilot-link icon indicating copy to clipboard operation
pilot-link copied to clipboard

`pilot-xfer --list -D` does not list all directory entries, if there are more than 64.

Open CoSoCo opened this issue 9 months ago • 1 comments

This is, because there is a maximum of 64 defined in function print_dir(...) in pilot-xfer.c.

It seems, the limit was set, because the parameter diriterator in function dlp_VFSDirEntryEnumerate(...) is difficult to use because of issue #7 .

A same limit can be found in pilot-foto-treo650.c.

CoSoCo avatar Mar 15 '25 00:03 CoSoCo

The underlying function dlp_VFSDirEntryEnumerate(...) is designed to retrieve the dir entries chunk-wise into a preallocated array of fixed size by help of the returned diriterator. Re-using the returned diriterator value for a subsequent chunk does not work, at least with my Palm Treo 650, instead error code -301 (PalmOSError) is returned.

Also "tests/vfs-test.c" should fail with Palm Treo 650. (I couldn't try it, because I don't understand, how to use the tests.)

So the minimal size for the response buffer must be evaluated to retrieve the total number of dir entries in one call.

CoSoCo avatar May 12 '25 10:05 CoSoCo