Uploaded image for project: 'XNAT'
  1. XNAT
  2. XNAT-2926

CatalogUtils doesn't handle gz files separately from tar.gz, which leads to extraction failures

    XMLWordPrintable

Details

    • Rank:
      0|100nls:

    Description

      Lines 529-537 of CatalogUtils looks like this:

      ZipI zipper;
      if (compression_method.equalsIgnoreCase(".tar")) {
          zipper = new TarUtils();
      } else if (compression_method.equalsIgnoreCase(".gz")) {
          zipper = new TarUtils();
          zipper.setCompressionMethod(ZipOutputStream.DEFLATED);
      } else {
          zipper = new ZipUtils();
      }

      That second case will match both tar.gz and gz, but the TarUtils fails on plain gz compression. There needs to be an explicit check for .tar.gz and .tgz and let gz fall through to the last else.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jrherrick@wustl.edu Rick Herrick
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: