[fpc-devel] FindFirst broken due to ExpandFileName bug?
Tony Maro
tony at maro.net
Mon Sep 12 20:22:33 CEST 2005
I just tried to use FindFirst to get a listing of files in a directory.
I passed FindFirst the following:
if FindFirst('/home/tony/test/*',faAnyFile, Res) < 0 then begin
It never would return any results. Then I noticed that FindFirst calls:
GlobSearchRec^.Path:=ExpandFileName(ExtractFilePath(Path));
So I ran:
ExpandFileName(ExtractFilePath('/home/tony/test/*'));
And I got:
/home/tony/LazarusFiles/testapp/"/home/tony/test/
You can see it concatenated my application path, a quote, and the path I
entered.
-Tony
More information about the fpc-devel
mailing list