Re: OS Independent file strings in resourcecollections

2009-09-17 Thread Raja Nagendra Kumar

Hi Stefan as suggested I have filed the issue and the same is found at

https://issues.apache.org/bugzilla/show_bug.cgi?id=47858

Regards,
Nagendra
-- 
View this message in context: 
http://www.nabble.com/OS-Independent-file-strings-in-resourcecollections-tp25486284p25489409.html
Sent from the Ant - Dev mailing list archive at Nabble.com.


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



Re: OS Independent file strings in resourcecollections

2009-09-17 Thread Stefan Bodewig
On 2009-09-17, Raja Nagendra Kumar  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  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