Browse Source

COMPRESS-324 be mor lenient when detecting GNU long name entries

master
Stefan Bodewig 9 years ago
parent
commit
661f8becc4
2 changed files with 6 additions and 4 deletions
  1. +4
    -0
      WHATSNEW
  2. +2
    -4
      src/main/org/apache/tools/tar/TarEntry.java

+ 4
- 0
WHATSNEW View File

@@ -18,6 +18,10 @@ Fixed bugs:
jars. This resulted in jar files that couldn't be read by Java5.
Bugzilla Report 58428

* <untar> will now detect GNU tar longname/link records even if they
don't use the names used by GNU tar itself. star is known to
create archives of that kind.
https://issues.apache.org/jira/browse/COMPRESS-324

Other changes:
--------------


+ 2
- 4
src/main/org/apache/tools/tar/TarEntry.java View File

@@ -706,8 +706,7 @@ public class TarEntry implements TarConstants {
* @return true if this is a long name extension provided by GNU tar
*/
public boolean isGNULongLinkEntry() {
return linkFlag == LF_GNUTYPE_LONGLINK
&& name.equals(GNU_LONGLINK);
return linkFlag == LF_GNUTYPE_LONGLINK;
}

/**
@@ -716,8 +715,7 @@ public class TarEntry implements TarConstants {
* @return true if this is a long name extension provided by GNU tar
*/
public boolean isGNULongNameEntry() {
return linkFlag == LF_GNUTYPE_LONGNAME
&& name.equals(GNU_LONGLINK);
return linkFlag == LF_GNUTYPE_LONGNAME;
}

/**


Loading…
Cancel
Save