Yeah, I had actually thought about checking that each include resulted in some file being selected. But I think your failonempty does a pretty good job. It will cover the simple case that you are included "*.cs" and want something to compile.
 
I still think we need a feature which lets us say, I expect this pattern will match something, so if it doesn't, fail. I guess the other way would be to allow for multiple filesets (or a fileset aggregator) that let us chain/include multiple filesets within.
 
----- Original Message -----
Sent: Monday, February 24, 2003 7:56 PM
Subject: [nant-dev] Bug fix for DirectoryScanner

First� let me say that TortoiseCVS just rules.

 

Anywho� I decided to take Scott up on his challenge to monkey with fileset� and in the process ran across a few bugs in DirectoryScanner.  Absolute paths like

<includes name=�\my\path� />

were being treated like

<includes name=�my\path� />

and converting to \my\base\dir\my\path

 

Also, my/path and my\path should be interchangeable now regardless of your platform.

 

So attached is the patch.  Let me know if the tortoise fails to satisfy� first time using it�.

 

Coming soon to a mail list near you�

            <fileset failonempty=�true�>

                        <includes = �blah/blah/**/*.cs� />

            </fileset>

 

I�ve got this working right now but want to bang it around a bit before submitting� I�m also not real certain that this is the best way to go about things� thoughts, anyone?

 

Hmmm� on second thought, I�m attaching the patch to fileset anyway� might make it easier for folks to decide, or at least give everyone a better idea of what I�m talking about.

 

I imagine it would be trivial to add a Log.WriteLineIf during that check� but I don�t want to further contribute to the bit-rot that the current logging methodology is causing.  J

 

Brian

Reply via email to