Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Jonas Maebe
On 01 May 2009, at 17:52, Mattias Gaertner wrote: On Fri, 1 May 2009 17:43:48 +0200 Jonas Maebe wrote: On 01 May 2009, at 11:55, Mattias Gaertner wrote: I thought the file attributes are ignored under linux, but apparently they are not. They are currently ignored if you do not use wildca

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Mattias Gaertner
On Fri, 1 May 2009 17:43:48 +0200 Jonas Maebe wrote: > On 01 May 2009, at 11:55, Mattias Gaertner wrote: > > > I thought the file attributes are ignored under linux, but > > apparently they are not. > > They are currently ignored if you do not use wildcards, otherwise > they are used. I'm teste

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Jonas Maebe
On 01 May 2009, at 11:55, Mattias Gaertner wrote: I thought the file attributes are ignored under linux, but apparently they are not. They are currently ignored if you do not use wildcards, otherwise they are used. I'm tested a fix to change that so that they are always used. Is it norma

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Graeme Geldenhuys
On Fri, May 1, 2009 at 5:24 PM, Mattias Gaertner wrote: > > Yes. Ah. And using faAnyFile and then testing .Attr for faDirectory is one way to overcome the problem. > It seems it is buggy under OS X too. > I guess, this must be added to the wiki pages about cross > platform issues. I'm using FP

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Mattias Gaertner
On Fri, 1 May 2009 17:13:39 +0200 Graeme Geldenhuys wrote: > On Fri, May 1, 2009 at 11:55 AM, Mattias Gaertner > wrote: > > I thought the file attributes are ignored under linux, but > > apparently they are not. > > Is it normal, that FindNext returns a file twice? > > Would that explain why th

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Graeme Geldenhuys
On Fri, May 1, 2009 at 11:55 AM, Mattias Gaertner wrote: > I thought the file attributes are ignored under linux, but apparently > they are not. > Is it normal, that FindNext returns a file twice? And sometimes even more than twice as the following output shows (using the code you posted). This

Re: [fpc-pascal] FindFirst FindNext

2009-05-01 Thread Graeme Geldenhuys
On Fri, May 1, 2009 at 11:55 AM, Mattias Gaertner wrote: > I thought the file attributes are ignored under linux, but apparently > they are not. > Is it normal, that FindNext returns a file twice? Would that explain why the TFileListBox component and Lazarus's "File Browser" add-on shows double f

[fpc-pascal] FindFirst FindNext

2009-05-01 Thread Mattias Gaertner
I thought the file attributes are ignored under linux, but apparently they are not. Is it normal, that FindNext returns a file twice? uses SysUtils; var Info: TSearchRec; begin if FindFirst('*',faDirectory,Info)=0 then begin repeat writeln(Info.Name); until FindNext(Info)<>0