Matthew, Your last "Optimize regexes" changes seem to have introduced a regression here (that was not yet covered by a test case). It is working fine with revision 1.46 of DirectoryScanner.
After your changes, the following pattern "**/obj/**" would match all files and subdirectories in <basedir>/obj, but not the <basedir>/obj directory itself. I have attached a build file that allow you to easily reproduce this issue. I'll try to find time to add a NUnit test case for this. Edwin, more info for you inline ... Gert > -----Original Message----- > From: Matthew Mastracci [mailto:[EMAIL PROTECTED] > Sent: woensdag 1 december 2004 0:38 > To: Castro, Edwin Gabriel (Firing Systems Engr.) > Cc: Gert Driesen; [EMAIL PROTECTED] > Subject: Re: [Nant-users] Re: FileSet Behavior > > Strange - the **\bin\** pattern should be removing all bin > directories > (since those match the pattern as well). I think we'll need > to get some > good unit tests for this stuff to be sure that we've fixed it for the > 0.85 release.. > > Castro, Edwin Gabriel (Firing Systems Engr.) wrote: > > >I did a few tests and it appears that the following is > finding only bin > >and obj folders. This is by design, yes. > > > ><delete> > > <fileset basedir="${folder}"> > > <include name="**\bin" /> > > <include name="**\obj" /> > > </fileset> > ></delete> > > > >Unfortunately, NAnt doesn't delete the folders. I suspect > that this is > >because the folders are not empty. Yeps > The help suggests that I can specify > >a folder to be deleted with all of its sub-folders. This obviously is > >not true when using a fileset. I haven't tested this using the 'dir' > >attribute. The base directory of the fileset itself will never be removed. > > > >For now, I'm using the following which works for me: > > > ><delete> > > <fileset basedir="${folder}"> > > <include name="**\bin\**" /> > > <include name="**\obj\**" /> > > </fileset> > ></delete> > > > >The folders are left behind, but the content goes away and that is my > >primary goal. This is a known issue, see above. Gert
bugnew6.build
Description: Binary data
