[SOLVED] [current]mc doesn't open archives with non standard extension
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[current]mc doesn't open archives with non standard extension
mc isn't opening archives with a non standard extension.
I just noticed this recently, in the last year or so and I am not sure what the issue is so I'm not sure where to start looking.
In my own case I am working with zip files with a non standard extension like .fr0 or .sa1. I was always able to open those files with mc and read or copy the files within those archives.
Can anyone shed some light on this and point me toward a solution?
Never really tested this before, but are you sure it was not a custom function for fr0 and sa1 listed in your /etc/mc/mc.ext file?
AFAIK, that is where zip extension is specified, for mc to be able to read a zip file.
Never really tested this before, but are you sure it was not a custom function for fr0 and sa1 listed in your /etc/mc/mc.ext file?
AFAIK, that is where zip extension is specified, for mc to be able to read a zip file.
Not that I am aware of. I have never customized any of the files in /etc/mc.
This does work on 14.2 but not -current and I am not sure what the difference is.
I don't think that is it. On a vps running mc 4.8.22 I can also open zip files with a non standard extension.
Compiled 4.8.22 on slackware64-14.2 and this is correct. 4.8.22 still reads zip files regardless of extension, while 4.8.24 does not.
Probably best to report it upstream, doesn't seem like packaging issue.
sed -i 's|^\(type/\)i/^zip\\|\1\\(Zip|' /etc/mc/mc.ext
See ticket #4180. The regression was introduced with this commit that added the -z switch to the file command invoked on type/ lines in mc.ext. It was partly fixed upstream in this commit, and then definitely, by this commit.
This may still be not enough on Slackware-current if file there is linked with libseccomp (it isn't on Debian, but Slackware rarely changes upstream defaults). mc would also need this patch then.
[SOLVED] [current]mc doesn't open archives with non standard extension
Quote:
Originally Posted by shruggy
There's an easy workaround.
Code:
sed -i 's|^\(type/\)i/^zip\\|\1\\(Zip|' /etc/mc/mc.ext
See ticket #4180. The regression was introduced with this commit that added the -z switch to the file command invoked on type/ lines in mc.ext. It was partly fixed upstream in this commit, and then definitely, by this commit.
This may still be not enough on Slackware-current if file there is linked with libseccomp (it isn't on Debian, but Slackware rarely changes upstream defaults). mc would also need this patch then.
Thank you. The sed command you gave solves this for me on slackware-current.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.