[fpc-pascal] ExpandFileName failure on long filenames on Linux
Michael Van Canneyt
michael at freepascal.org
Sat Aug 31 15:24:39 CEST 2013
On Sat, 31 Aug 2013, Bart wrote:
> Hi,
>
> Before reporting this as a bug, can somebody confirm?
>
> program efn;
>
> uses sysutils;
>
> begin
> writeln(expandfilename(paramstr(1)));
> end.
>
> If I cd to a directory with a very long name (>255 chars) and then
> exeucte the following:
> $ ~/LazarusProjecten/bugs/findfirst/efn .
>
> It prints out only the first 255 characters of the current directory.
> (This issue poped up whilst investigating
> http://bugs.freepascal.org/view.php?id=24885)
Did you enable ansistrings and object pascal mode ?
Because as it is displayed above, the program will use shortstrings, and they are limited to 255 chars.
Michael.
More information about the fpc-pascal
mailing list