On 28 Feb 12, at 21:20, Marco Borsari wrote: > Jonas Maebe wrote:
Marco, > > That is by design, see > > http://www.freepascal.org/docs-html/rtl/sysutils/findfirst.html (the same > > goes for the findfirst from the Dos unit) > > > > You have to check the attributes of the returned entries to see whether > > they match what you want. This is TP/Delphi-compatible. > > > I don't know of Delphi compatibility, but sure not for TP and/or FPC > itself when doslfn is disabled. It cannot be other than that, because > the interrupt service which lies on short FindFirst don't accept in the > cx required criteria, but only allowable. Retaining this discrepance > makes old application that use file searching to crash when running on > new environment. Jonas is right, it is no bug. The difference you get between the case of having LFN enabled or not is most likely related to the fact that you search for '*' mask rather than '*.*' in your example. As you might know, '*' matches or names with or without extensions on LFN enabled drives (or operating systems - see below) whereas SFN limited access (which includes TP/BP) requires you to use '*.*' to get the same result. Typically, directories don't have any extensions on DOS drives which is the most likely explanation for your results. You can check the results with the attached example program (I just did and the results if compiled with TP/BP and FPC are exactly the same for me). Tomas
t.pas
Description: Binary data
_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
