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

ArchiveInputStream fails reading filenames with ANSI characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.21
    • None
    • Archivers
    • None

    Description

      I attempted to extract ANSI art packs from SixteenColors ANSI archive but many of them fail.

       

      Upon some debugging it appears that as many of the file names contain ANSI characters which are parsed by the ArchiveInputStream as question marks, the file fails to be saved to disk as question mark is a bad character to be had in a filename.

      Specific code:

      ArchiveInputStream archiveInputStream = archiveStreamFactory.createArchiveInputStream(ArchiveStreamFactory.ZIP, inputStream);
      ArchiveEntry archiveEntry = null;
      while((archiveEntry = archiveInputStream.getNextEntry()) != null) {
      Path path = Paths.get(extractDirectory, archiveEntry.getName());

      example of a non parseable filename in an archive:

      https://github.com/sixteencolors/sixteencolors-archive/blob/master/1992/ace-r%232.zip

      A∙C∙E.ANS

      Bad ZIP file example:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chaiavi Avi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: