[fpc-pascal] Findfirst/findnext with a samba share

Ludo Brands ludo.brands at free.fr
Fri Mar 1 11:20:43 CET 2013


On 03/01/2013 10:55 AM, Max Vlasov wrote:
> 
> On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands <ludo.brands at free.fr
> <mailto:ludo.brands at free.fr>> wrote:
> 
>     On 03/01/2013 09:14 AM, Max Vlasov wrote:
>     >
>     > The question is what is different in nautilus and midnight commander
>     > comparing to fpc directoy-listing functions that allows them to list
>     > directories correctly in the bug's case?
>     >
> 
>     The difference with other tools is that FPC gives a very small buffer to
>     getdents64.
> 
> 
> Thanks, did I understand this right? It's a samba bug, but it appears
> only in a specific context of small buffers, other programs (nautilus,
> mc) usually use larger buffers so has a kind of workaround this bug.
> 

The bug results in dropping a file between 2 consecutive calls to
getdents/getdents64. Making the buffer large enough for most common
cases is indeed a workaround, though I doubt that other programs use
bigger buffers solely to work around a samba bug.

Perhaps one of the core devs can comment on the reason for the small
buffer size in FPC.

Ludo



More information about the fpc-pascal mailing list