[fpc-devel] Re: FindFile / FindNext does work with > 253 character length files

Sergei Gorelkin sergei_gorelkin at mail.ru
Sat Mar 15 15:00:13 CET 2008


Graeme Geldenhuys wrote:
> On 14/03/2008, Sergei Gorelkin <sergei_gorelkin at mail.ru> wrote:
>>  Btw, strange to hear about 255 character limit on Linux. Its headers
>>  define MAX_PATH value as 4097.
> 
> I thought the same at first, but then realized there is a difference
> between filename length and path length. I believe Michael's
> explanation hits the nail on the head.
> 
Now I have understood it, too :)

I could reproduce the issue on my Linux, with the tiny difference: 
maximum working filename length for me is 252, not 253 as in your case 
(???).
It turns out that for longer filenames fpreaddir() failes with errno=22 
(invalid argument).

Best regards,
Sergei.



More information about the fpc-devel mailing list