Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 04:37 PM, Michael Van Canneyt wrote: > > On Fri, 1 Mar 2013, Ludo Brands wrote: > >> What about just using a 32k buffer? > > No problem with that as far as I am concerned. > > Since the code is shared between embedded and non-embedded targets, it > might be better to have the opti

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 06:02 PM, Sven Barth wrote: > > While the kernel might pass less than 256 characters the dirent > structure contains a "dd_nextoff" field which is already used in FPC's > fpreaddir call to locate the next returned entry. > Yes, I know. Otherwise we would lose more than one file na

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Sven Barth
On 01.03.2013 16:08, Ludo Brands wrote: On 03/01/2013 12:52 PM, Sven Barth wrote: Currently FPC allocates only one pdirent in fpopendir (rtl/linux/ossysc.inc). Maybe it should first stat the directory and then decide based on st_blksize how much pdirent entries to allocate (but it should also p

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Michael Van Canneyt
On Fri, 1 Mar 2013, Ludo Brands wrote: On 03/01/2013 12:52 PM, Sven Barth wrote: Currently FPC allocates only one pdirent in fpopendir (rtl/linux/ossysc.inc). Maybe it should first stat the directory and then decide based on st_blksize how much pdirent entries to allocate (but it should also

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 12:52 PM, Sven Barth wrote: > Currently FPC allocates only one pdirent in fpopendir > (rtl/linux/ossysc.inc). Maybe it should first stat the directory and > then decide based on st_blksize how much pdirent entries to allocate > (but it should also provide a sane default, as there is

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Sven Barth
On 01.03.2013 12:31, Marco van de Voort wrote: In our previous episode, Ludo Brands said: The question is what is different in nautilus and midnight commander comparing to fpc directoy-listing functions that allows them to list directories correctly in the bug's case? The difference with oth

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Marco van de Voort
In our previous episode, Ludo Brands said: > > > > The question is what is different in nautilus and midnight commander > > comparing to fpc directoy-listing functions that allows them to list > > directories correctly in the bug's case? > > > > The difference with other tools is that FPC gives

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 10:55 AM, Max Vlasov wrote: > > On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands > wrote: > > On 03/01/2013 09:14 AM, Max Vlasov wrote: > > > > The question is what is different in nautilus and midnight commander > > comparing to fpc directoy

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Max Vlasov
On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands wrote: > On 03/01/2013 09:14 AM, Max Vlasov wrote: > > > > The question is what is different in nautilus and midnight commander > > comparing to fpc directoy-listing functions that allows them to list > > directories correctly in the bug's case? > > >

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 09:14 AM, Max Vlasov wrote: > Hi, > > Working with lazarus on Linux Mint I noticed that when I mount a windows > shared with "Connect to server", everything works fine (Nautilus, > Midnight Commander, Lazarus file operations). But meeting that .gvfs > folder is hidden, I tried to mou

[fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Max Vlasov
Hi, Working with lazarus on Linux Mint I noticed that when I mount a windows shared with "Connect to server", everything works fine (Nautilus, Midnight Commander, Lazarus file operations). But meeting that .gvfs folder is hidden, I tried to mount "mount -t cifs" directly in the shell. After such

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

Re: [fpc-pascal] FindFirst / FindNext with faHidden under Linux

2007-06-12 Thread Daniƫl Mantione
Op Tue, 12 Jun 2007, schreef Graeme Geldenhuys: > Hi, > > I'm doing a FindFirst / FindNext and fitering out all faHidden and > faDirectory results. > I don't want to show and dot (.) directories as they are > considered hidden under Linux. > Yet FindFirst / FindNext doesn't have the faHidden fl

[fpc-pascal] FindFirst / FindNext with faHidden under Linux

2007-06-12 Thread Graeme Geldenhuys
Hi, I'm doing a FindFirst / FindNext and fitering out all faHidden and faDirectory results. I don't want to show and dot (.) directories as they are considered hidden under Linux. Yet FindFirst / FindNext doesn't have the faHidden flag set for those directories Is there another function or anoth