ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51646] New: pathconvert - mapper using OS directory separator instead of dirsep
Date Thu, 11 Aug 2011 01:50:15 GMT

             Bug #: 51646
           Summary: pathconvert - mapper using OS directory separator
                    instead of dirsep
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
    Classification: Unclassified

It looks like pathcovert is using the OS directory separator for processing
mapper even if a custom dirsep is specified.

I'm trying to write pathcovert statement that is OS agnostic, so I turn
dirsep="/" since I don't want to deal with windows "\".  I need to do some
manipulation on the path as well, turning the file names into properties, so I
use mapper to strip the parts I don't need.

<pathconvert property=""
pathsep="=${line.separator}" dirsep="/"
  refid="-service.fragment.path" >
    <!-- BUGBUG - even though dirsep=/, the filter sees \ on windows.  The
below line is necessary to make windows/linux treat the path the same-->
    <replacestring from="\" to="/" />
    <replaceregex pattern=".*/([^/]*)" replace="\1"/>

If I comment out the replacestring statement, mapper should see the path
elements as "a/b/c/file".

with replacestring commented, replaceregex does not match, because its seeing

Work around:
Adding replacestring statement in place of the dirsep attribute (yuck).

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message