You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/08/12 14:54:17 UTC
DO NOT REPLY [Bug 49744] New: new
org.apache.tools.tar.TarEntry("/").isDirectory() returns false
https://issues.apache.org/bugzilla/show_bug.cgi?id=49744
Summary: new org.apache.tools.tar.TarEntry("/").isDirectory()
returns false
Product: Ant
Version: 1.8.1
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: christian@schlichtherle.de
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
(https://truezip.dev.java.net) 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: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 49744] new
org.apache.tools.tar.TarEntry("/").isDirectory() returns false
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49744
--- Comment #1 from Christian Schlichtherle <ch...@schlichtherle.de> 2010-08-12 09:21:30 EDT ---
This issue has also been filed to TrueZIP's Issue Tracker:
https://truezip.dev.java.net/issues/show_bug.cgi?id=36
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 49744] new
org.apache.tools.tar.TarEntry("/").isDirectory() returns false
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49744
Antoine Levy-Lambert <an...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|1.8.1 |1.8.2
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.