JCL 1.97 BuildFileList

Aaron Sherber <[email protected]> Tue, 06 Jun 2006 23:30:59 -0400
Newsgroups gmane.comp.lang.delphi.jedi
Message-ID <[email protected]>
Hi,

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

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.



------------------------ Yahoo! Groups Sponsor --------------------~--> 
You can search right from your browser? It's easy and it's free.  See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/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/