On 2009-09-17, Raja Nagendra Kumar <nagendra.r...@tejasoft.com> wrote:

> Hi,

> I am using ResourceCollections such as Union etc. However when ever I
> iterate, I am seeing the file names be as per the OS conventions.
> e.g if the file on windows matches to the collections and it is located in

> f:\work\nag\test.txt

> the the union iterator gives it as f:\work\nag\test.txt and not as
> f:/work/nag/test.txt.

> due to this my name matching , using restrict etc are failing. as my match
> pattern uses / instead of \ for os independency.

> In this context, is there a way to tell the ant to use always OS independent
> file path separator..

I see what you mean.  The <filename> fileselector takes care of the file
separator but the name resource selector does not.  I'd suggest adding a
handleDirSep attribute like the one for globmapper to the name selector
for the next Ant release.

Could you please file a bugzilla issue for this?

As a workaround you can use ${file.separator} instead of / all over your
patterns (or if you are using them programmatically
java.io.File.separator[Char]).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to