Re: JCL 1.97 BuildFileList
Olivier Sannier <[email protected]> Wed, 07 Jun 2006 08:45:50 +0200
| Newsgroups | gmane.comp.lang.delphi.jedi |
|---|---|
| Message-ID | <[email protected]> |
Yes, this was changed on purpose as WinXP added some flags along the way.
What you should do is to pass in faAnyFile instead of 0, which would=20
then work.
Aaron Sherber wrote:
>
> Hi,
>
> I just upgraded my JCL from 1.22 to 1.97, and I'm finding a few things=20
> broken.
>
> In JclFileUtils.BuildFileList, for example, the code that used to read
>
> if (SearchRec.Name <> '.') and (SearchRec.Name <> '..') then
> List.Add(SearchRec.Name);
>
> now reads
>
> if (SearchRec.Name <> '.') and (SearchRec.Name <> '..')
> and ((SearchRec.Attr and Attr) =3D SearchRec.Attr) then
> List.Add(SearchRec.Name);
>
> The added check on attributes is causing this function no longer to
> be a simple wrapper for FindFirst, FindNext, FindClose. When I roll
> my own file list, I do
>
> FindFirst('c:\foo\*.*', 0, SearchRec);
>
> But BuildFileList now won't return the same files, because most of my
> files have the Archive flag set, and so the attribute comparison
> (faArchive and 0 <> faArchive) will fail. I guess I can pass
> faArchive -- but again, that makes the call different from what works
> in FindFirst.
>
> Does anyone know why this was changed? Am I missing something here?
>
> Thanks,
> Aaron.
>
>=20=20
------------------------ Yahoo! Groups Sponsor --------------------~-->=20
Everything you need is one=A0click away.=A0 Make Yahoo! your home page=A0no=
w.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/i7folB/TM
--------------------------------------------------------------------~->=20
=20
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Delphi-JEDI/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
=20