Ticket #4628 (closed defect: duplicate)

Opened 18 hours ago

Last modified 10 hours ago

Adding an executable file to a zip archive with F5 forgets the executable bit

Reported by: ilyagr Owned by:
Priority: major Milestone: Future Releases
Component: mc-core Version: 4.8.32
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

  1. Open a ZIP archive by pressing Enter on it in the left pane. In my case, the file had VSIX extension (don't think it matters)
  2. Find an executable file (in the Unix sense) on the right pane
  3. Press F5 and Enter to copy the file into the archive.
  4. Observe that the executable bit is not set.

zipinfo confirms that the executable bit is not set. In this example zipinfo file, the last three files were added by MC, the rest were there before.

`console
$ zipinfo test.vsix
Archive: test.vsix
Zip file size: 52810887 bytes, number of entries: 49
(... some files omitted)
-rw-rw-r-- 6.3 unx 3156 b- defN 24-Dec-29 15:49 extension.vsixmanifest
-rw------- 3.0 unx 34599192 bx defN 25-Jan-08 17:52 extension/_dist/superbol-free2
-rw------- 3.0 unx 34599192 bx defN 25-Jan-08 18:08 extension/_dist/superbol-free3
-rw------- 3.0 unx 34599192 bx defN 25-Jan-08 18:08 extension/_dist/superbol-free-linux-x64
49 files, 128163558 bytes uncompressed, 52802923 bytes compressed: 58.8%
`

The expected output would be something like:

`
...
-rw-r--r-- 6.3 unx 2044 bl defN 24-Dec-29 15:29 extension/syntaxes/listfile.tmLanguage.json
-rw-rw-r-- 6.3 unx 3156 b- defN 24-Dec-29 15:49 extension.vsixmanifest
-r-xr-xr-x 6.3 unx 34599192 bx defN 24-Dec-29 15:49 extension/_dist/superbol-free
...
`

mc V returns:

`
GNU Midnight Commander 4.8.32
Built with GLib 2.82.4
Built with S-Lang 2.3.3 with terminfo database
Built with libssh2 1.11.1
With builtin editor
With subshell support as default
With support for background operations
With mouse support on xterm
With support for X11 events
With internationalization support
With multiple codepages support
Virtual File Systems:

cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, shell

Data types:

char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

`

I'm running on darwin-aarch64

Change History

comment:1 Changed 18 hours ago by ilyagr

  • Version changed from master to 4.8.32

comment:2 Changed 18 hours ago by ilyagr

Oh, and in case something is weird about my ZIP/VSIX file, you can download it from https://drive.google.com/file/d/1FHWgpjqmb_uhk65gbKp7tvZLCcYuq61B/view?usp=drive_link .

It contains an executable file in extension/_dist subdirectory. My original goal was to rename it via MC, so I tried extracting, renaming, and re-adding it. However, it lost the executable bit upon being re-added.

comment:3 Changed 15 hours ago by andrew_b

Apparently, the duplicate of #4558.

comment:4 Changed 14 hours ago by ilyagr

The end-result is similar, but I am not sure whether or not they are duplicates. For #4558, I'm not sure the 7zip format supports Unix-style executable bits at all. Zip format definitely does. I'm also not sure whether mc uses the same library to modify zip and 7zip archives.

Last edited 14 hours ago by ilyagr (previous) (diff)

comment:5 Changed 10 hours ago by zaytsev

  • Status changed from new to closed
  • Resolution set to duplicate

Closed as duplicate of #4558.

comment:6 Changed 10 hours ago by zaytsev

I also think that this is a duplicate of #4558. Let's continue the discussion there. I think that #4629 is a separate issue, so we can leave it open.

Note: See TracTickets for help on using tickets.