ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 49744] New: new"/").isDirectory() returns false
Date Thu, 12 Aug 2010 12:54:17 GMT

           Summary: new"/").isDirectory()
                    returns false
           Product: Ant
           Version: 1.8.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Core

This is a regression since Ant 1.7.1.

In Ant 1.8.1, the constructor public TarEntry(String name) and others call the
method normalizeFileName in order to (you guessed it) normalize the file name.
However, this method normalizes "/" into "". As a consequence, the method
isDirectory() returns false for this entry.

Rationale: A TarEntry with the name "/" is created by TrueZIP 6.7
( as a virtual root directory. This TarEntry is
actually never written to the TAR file, but solely used in order to associate
meta data with the TAR file itself. Later on, the last modification time of
this virtual root directory is used to post-fix the last modification time of
the TAR file itself.

Work-around: Call the newly introduced constructor public TarEntry(String name,
boolean preserveLeadingSlashes) with true as its boolean parameter.

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

View raw message