Re: JCL 1.97 BuildFileList

"outch2fr" <[email protected]> Wed, 07 Jun 2006 06:23:41 -0000
Newsgroups gmane.comp.lang.delphi.jedi
Message-ID <[email protected]>
Hi,

--- In [email protected], Aaron Sherber <aaron@...> wrote:
> I just upgraded my JCL from 1.22 to 1.97, and I'm finding a few
things 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) = SearchRec.Attr) then
>            List.Add(SearchRec.Name);

This line was added because FindFirst/FindNext returns files that do
not match flags.

> 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);

You should pass faAnyFile to BuildFileList instead of 0.

Cheers,

Florent Ouchet








------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/i7folB/TM
--------------------------------------------------------------------~-> 

 
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/