You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2009/10/08 14:07:20 UTC

svn commit: r823139 - in /commons/proper/compress/trunk/src: changes/changes.xml main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java

Author: bodewig
Date: Thu Oct  8 12:07:19 2009
New Revision: 823139

URL: http://svn.apache.org/viewvc?rev=823139&view=rev
Log:
properly indicate "oldgnu" mode for long file name entries in tar.  COMPRESS-86

Modified:
    commons/proper/compress/trunk/src/changes/changes.xml
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java   (contents, props changed)

Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=823139&r1=823138&r2=823139&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Thu Oct  8 12:07:19 2009
@@ -23,6 +23,11 @@
   </properties>
   <body>
     <release version="1.1" date="as in SVN" description="Release 1.1">
+      <action type="fix" issue="COMPRESS-86" date="2009-10-08">
+        Tar archive entries holding the file name for names longer
+        than 100 characters in GNU longfile mode didn't properly
+        specify they'd be using the "oldgnu" extension.
+      </action>
       <action type="add" date="2009-08-25">
         A new constructor of TarArchiveEntry can create entries with
         names that start with slashes - the default is to strip

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java?rev=823139&r1=823138&r2=823139&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java Thu Oct  8 12:07:19 2009
@@ -210,6 +210,10 @@
     public TarArchiveEntry(String name, byte linkFlag) {
         this(name);
         this.linkFlag = linkFlag;
+        if (linkFlag == LF_GNUTYPE_LONGNAME) {
+            magic = MAGIC_GNU;
+            version = VERSION_GNU_SPACE;
+        }
     }
 
     /**

Propchange: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveEntry.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct  8 12:07:19 2009
@@ -1,2 +1,2 @@
 /ant/core/trunk/src/main/org/apache/tools/tar/TarArchiveEntry.java:741089
-/ant/core/trunk/src/main/org/apache/tools/tar/TarEntry.java:807513
+/ant/core/trunk/src/main/org/apache/tools/tar/TarEntry.java:807513,823136