Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53874

ZipArchiver should set the type bits when setting the Unix mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • core
    • None
    • Jenkins 2.138.1

    Description

      When ZipArchiver sets the Unix mode for files and directories in the archive, it only sets the permission part of the mode, and not the type part. This causes some problems:

      • If you run zipinfo on such an archive, it shows the mode as ?rw-r--r-- - which is harmless, but confusing.
      • Old versions of libarchive can't extract such files (see https://github.com/libarchive/libarchive/issues/441). There might be other extractors that have similar problems.

      FIxing this should be simple enough - just OR the mode with S_IFREG (0100000) for files and S_IFDIR (0040000) for directories.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rdonchen_intel Roman Donchenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: