Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-30 Thread Marc Santhoff
Am Donnerstag, den 29.06.2006, 16:16 +0200 schrieb Marc Santhoff: > How can i detect if sysutils.FindFirst() or FindNext() fails lacking > permissions? As a quick and dirty hack I added an addtitional "stat" on the starting dir for FindFirst and let it bail out early for protecting "ErrNo" ("open

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-29 Thread Marc Santhoff
Am Donnerstag, den 29.06.2006, 09:12 +0200 schrieb Marco van de Voort: > > On 28 Jun 06, at 23:41, Marc Santhoff wrote: > > > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: > > . > > . > > > What I don't understand is why the var "errno" is not set or it's value > > > is destroy

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-29 Thread Tomas Hajny
Marco van de Voort wrote: >> Marco van de Voort wrote: >> > >> > (that is not really the problem, OS errorcodes can be hauled with >> > getlastoserror, which is errno on *nix) >> >> Well, it is a problem, because not returning the error code directly in >> return value violates SysUtils.FindFirst s

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-29 Thread Marco van de Voort
> Marco van de Voort wrote: > > > > (that is not really the problem, OS errorcodes can be hauled with > > getlastoserror, which is errno on *nix) > > Well, it is a problem, because not returning the error code directly in > return value violates SysUtils.FindFirst specification and most probably >

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-29 Thread Tomas Hajny
Marco van de Voort wrote: >> On 28 Jun 06, at 23:41, Marc Santhoff wrote: >> > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: >> . >> . >> > What I don't understand is why the var "errno" is not set or it's >> value >> > is destroyed before Findfirst/-Next return. Does this valu

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-29 Thread Marco van de Voort
> On 28 Jun 06, at 23:41, Marc Santhoff wrote: > > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: > . > . > > What I don't understand is why the var "errno" is not set or it's value > > is destroyed before Findfirst/-Next return. Does this value has to be > > set explicitely by

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-28 Thread Tomas Hajny
On 29 Jun 06, at 0:19, Marc Santhoff wrote: > Am Donnerstag, den 29.06.2006, 00:04 +0200 schrieb Michael Van Canneyt: . . > My approach to detect failing FindFirst/FindNext would be to do > something like this: > > <--- rtl/unix/sysutils.pp:549 ---> > Function GlobToTSearchRec (Var Info : TSearc

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-28 Thread Tomas Hajny
On 28 Jun 06, at 23:41, Marc Santhoff wrote: > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: . . > What I don't understand is why the var "errno" is not set or it's value > is destroyed before Findfirst/-Next return. Does this value has to be > set explicitely by using fpseterr

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-28 Thread Marc Santhoff
Am Donnerstag, den 29.06.2006, 00:04 +0200 schrieb Michael Van Canneyt: > > On Wed, 28 Jun 2006, Marc Santhoff wrote: > > > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: > > > If I remember correctly, the DOS FindFirst/Next only handles > > > shortstring-sized path names. > >

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-28 Thread Michael Van Canneyt
On Wed, 28 Jun 2006, Marc Santhoff wrote: > Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: > > If I remember correctly, the DOS FindFirst/Next only handles > > shortstring-sized path names. > > If possible at all I will not use DOS unit. > > > Another "quirk" about using Find

Re: [fpc-pascal] RE: findfirst and findnext on non accessible files

2006-06-28 Thread Marc Santhoff
Am Mittwoch, den 28.06.2006, 12:17 -0500 schrieb Jeff Pohlmeyer: > If I remember correctly, the DOS FindFirst/Next only handles > shortstring-sized path names. If possible at all I will not use DOS unit. > Another "quirk" about using FindNext on Unix is that a > symlink to a directory sets the fa