Ticket #4628 (closed defect: duplicate)
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
- 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)
- Find an executable file (in the Unix sense) on the right pane
- Press F5 and Enter to copy the file into the archive.
- 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:2 Changed 13 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:4 Changed 9 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.
See also https://midnight-commander.org/ticket/4629 for a followup.