TrueZIP
  1. TrueZIP
  2. TRUEZIP-338

TFile cannot find all expected files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: TrueZIP 7.7.5
    • Fix Version/s: None
    • Component/s: TrueZIP Driver TAR
    • Labels:
      None
    • Environment:

      Windows 7 64 bit with JDK 1.6.38 / 1.7.11

      Description

      For some TAR.GZ archives generated by Maven Assembly Plugin, TruzZip canno find all files.

      • Do not work on TAR.GZ
      • Do not work on TAR if GZ was decompressed with TrueZip.
      • Work on TAR if GZ was decompressed with 7-zip.

      I cannot upload the example TAR.GZ at the moment because of restrictions in my company, but I could do it soon.

      Test.java
      public static void main(String[] args) throws Exception {
      
      	final TArchiveDetector detectorGz = new TArchiveDetector("gz", new TarGZipDriver(IOPoolLocator.SINGLETON));
      	final TArchiveDetector detectorTar = new TArchiveDetector("tar", new TarDriver(IOPoolLocator.SINGLETON));
      	final TFile gz = new TFile(args[0], detectorGz);
      	final TFile tar = new TFile(gz.getParentFile(), "extracted.tar", detectorTar);
      
      	TFile.cp_r(gz, tar, detectorGz, detectorTar);
      	recursive(tar);
      }
      
      public static void recursive(final TFile file) {
      
      	if (!file.isDirectory()) {
      
      		System.out.println(file);
      		return;
      	}
      
      	final TFile[] children = file.listFiles();
      
      	System.out.println(file + " (" + children.length + ')');
      
      	for (final TFile child : children) {
      
      		recursive(child);
      	}
      }
      

        Activity

        diamss created issue -
        Christian Schlichtherle made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Christian Schlichtherle made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Christian Schlichtherle
            Reporter:
            diamss
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: