Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-245

TarArchiveInputStream#getNextTarEntry returns null prematurely

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6
    • 1.7
    • Archivers
    • Linux

    Description

      The attached archive decompressed with 1.6 only extracts part of the archive. This does not happen with version 1.5

      FileInputStream fin = new FileInputStream("exampletar.tar.gz");
      GZIPInputStream gin = new GZIPInputStream(fin);
      TarArchiveInputStream tin = new TarArchiveInputStream(gin);            TarArchiveEntry entry;
                  while ((entry = tin.getNextTarEntry()) != null) {
      

      The file is created with

      tar cvzf

      in RHEL 6.5 and the contents look like this when extracted with the same tool:

      topdirectory/
      topdirectory/about.html
      topdirectory/.eclipseproduct
      topdirectory/plugins/
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/about.html
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/eclipse.inf
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/ECLIPSEF.SF
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/MANIFEST.MF
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/ECLIPSEF.RSA
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/launcher.gtk.linux.x86_64.properties
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/eclipse_1206.so
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/about.html
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/fragment.properties
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/.api_description
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/META-INF/
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/META-INF/eclipse.inf
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/META-INF/ECLIPSEF.SF
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/META-INF/MANIFEST.MF
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/META-INF/ECLIPSEF.RSA
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/runtime_registry_compatibility.jar
      topdirectory/configuration/
      topdirectory/configuration/config.ini
      topdirectory/icon.xpm
      topdirectory/about_files/
      topdirectory/about_files/pixman-licenses.txt
      topdirectory/about_files/mpl-v11.txt
      topdirectory/about_files/about_cairo.html
      topdirectory/libcairo-swt.so
      

      with commons-compress-1.6 it looks like this:

      topdirectory/
      topdirectory/about.html
      topdirectory/.eclipseproduct
      topdirectory/plugins
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/about.html
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/eclipse.inf
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/ECLIPSEF.SF
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/MANIFEST.MF
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/META-INF/ECLIPSEF.RSA
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/launcher.gtk.linux.x86_64.properties
      topdirectory/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.200.v20090519/eclipse_1206.so
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/about.html
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/fragment.properties
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/.api_description
      topdirectory/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20090429-1800/META-INF
      

      Attachments

        1. exampletar.tar.gz
          234 kB
          Andreas Aronsson

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andreas.aronsson Andreas Aronsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: