LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-09-2021, 10:05 PM   #1
aianson
LQ Newbie
 
Registered: Nov 2006
Location: Penticton, BC
Distribution: Archlinux
Posts: 15

Rep: Reputation: 1
[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?
 
Old 07-10-2021, 01:16 AM   #2
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
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.
 
Old 07-10-2021, 03:21 AM   #3
aianson
LQ Newbie
 
Registered: Nov 2006
Location: Penticton, BC
Distribution: Archlinux
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by elcore View Post
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.
 
Old 07-10-2021, 03:33 AM   #4
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
Might've been changed in mc code upstream, I can't make it open zip.fr0 on mc-4.8.26 either.

Edit: Nevermind, according to changelog, it's highly likely that this has caused it:

Code:
Version 4.8.12

- VFS 
    * Use .zip extension as preferred way to recognize ZIP archives (#2857)

Last edited by elcore; 07-10-2021 at 04:02 AM.
 
Old 07-10-2021, 06:35 AM   #5
aianson
LQ Newbie
 
Registered: Nov 2006
Location: Penticton, BC
Distribution: Archlinux
Posts: 15

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by elcore View Post
Might've been changed in mc code upstream, I can't make it open zip.fr0 on mc-4.8.26 either.

Edit: Nevermind, according to changelog, it's highly likely that this has caused it:

Code:
Version 4.8.12

- VFS 
    * Use .zip extension as preferred way to recognize ZIP archives (#2857)
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.
 
Old 07-10-2021, 07:40 AM   #6
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
Quote:
Originally Posted by aianson View Post
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.
 
Old 07-10-2021, 08:18 AM   #7
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
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.

Last edited by shruggy; 07-10-2021 at 09:53 AM.
 
2 members found this post helpful.
Old 07-10-2021, 07:06 PM   #8
aianson
LQ Newbie
 
Registered: Nov 2006
Location: Penticton, BC
Distribution: Archlinux
Posts: 15

Original Poster
Rep: Reputation: 1
[SOLVED] [current]mc doesn't open archives with non standard extension

Quote:
Originally Posted by shruggy View Post
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.

Last edited by aianson; 07-10-2021 at 07:15 PM.
 
Old 08-15-2021, 01:22 PM   #9
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
It appears that it's fixed upstream in 4.8.27
 
Old 08-15-2021, 02:31 PM   #10
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082
Quote:
Originally Posted by elcore View Post
It appears that it's fixed upstream in 4.8.27
right

http://midnight-commander.org/wiki/NEWS-4.8.27
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How can I open a binary file with the extension .chk or no extension? 55sgu Linux - Newbie 3 06-21-2019 02:59 AM
Printing of application out in standard and non standard paper size gkedar614 Linux - Newbie 2 08-23-2013 03:40 AM
Problem with unpacking archives without extension Tarzan1984 Linux - Software 4 06-09-2009 07:51 AM
Segmenting archives into a variety of smaller archives. ktek Linux - Software 4 09-25-2008 04:47 AM
LXer: Viewing contents of online archives with ArchView extension LXer Syndicated Linux News 0 08-04-2008 08:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration