Hello,
I found the following bug in the Beta version of GPC.
Best regards, Peter Dietrich -------------------- GPC-Version (gpc -v):
Reading specs from C:\usr\local\lib\gcc-lib\i386-mingw32\2.8.1\specs gpc version 19990118, based on gcc-2.8.1
System-Version:
Windows NT 4.0 on i386
Problem description:
The following program shows that FExpand does not reliably expand pathnames containing ..:
program test (output);
uses GPC;
begin writeln ('Current working directory: ', GetCurrentDirectory); writeln ('Expanding ..\sort : ', FExpand ('..\sort')); end.
The program output:
F:\PROJECTS\ISIDATA\isidef>gpc --automake test4.pas
F:\PROJECTS\ISIDATA\isidef>a.exe Current working directory: F:\PROJECTS\ISIDATA\isidef Expanding ..\sort : F:\PROJECTS\ISIDATA\sort
F:\PROJECTS\ISIDATA\isidef>cd ..\uvw
F:\PROJECTS\ISIDATA\uvw>..\isidef\a.exe Current working directory: F:\PROJECTS\ISIDATA\uvw Expanding ..\sort : F:\sort
F:\PROJECTS\ISIDATA\uvw>cd ..\lib
F:\PROJECTS\ISIDATA\lib>..\isidef\a.exe Current working directory: F:\PROJECTS\ISIDATA\lib Expanding ..\sort : F:\sort
F:\PROJECTS\ISIDATA\lib>cd ..\uvw_in
F:\PROJECTS\ISIDATA\uvw_in>..\isidef\a.exe Current working directory: F:\PROJECTS\ISIDATA\uvw_in Expanding ..\sort : F:\PROJECTS\ISIDATA\sort
The output of dir ..:
F:\PROJECTS\ISIDATA\uvw_in>dir .. Datenträger in Laufwerk F: ist NT4 Datenträgernummer: 2586-5521
Verzeichnis von F:\PROJECTS\ISIDATA
18.05.99 14:20 <DIR> . 18.05.99 14:20 <DIR> .. 18.05.99 14:20 <DIR> isicom 18.05.99 14:20 <DIR> isidef 18.05.99 14:21 <DIR> lib 18.05.99 14:21 <DIR> ppp 18.05.99 14:21 <DIR> save 18.05.99 14:21 <DIR> sort 18.05.99 14:21 <DIR> ssv 18.05.99 14:21 <DIR> uvw 18.05.99 14:21 <DIR> uvw_env 18.05.99 14:21 <DIR> uvw_in 18.05.99 14:21 <DIR> uvw_out 18.05.99 14:21 <DIR> uvw_test 18.05.99 14:30 <DIR> gpc