[patch] 7zip support + bug in viewer



Two bugs in mc from CVS, for one of them a patch is attached:

1. MC interpret .7z archives wrongly as manpages if you press F3 on them
(usually causes MC to hang while nroff is munching several megabytes of binary trash...) I have attached a patch to mc.ext.in that will show listing of archive for .7z files instead (if you have p7zip installed) - like it is done for .zip, etc ...
(attached mc_mc.ext.patch)

2. If I try to view HTML and have not lynx installed (or basically anything for which I do not have coresponding viewer from mc.ext installed), I think it might be better to show the file directly, instead of something like "lynx: command not found" followed by "Empty output from child filter") For files that are "almost text" like html it makes much more sense to display them as-is instead of some error message I think I may change the view_load in view.c that if the view_load_command_output returns error (or at least error of type 'viewer not found'), it will show the file directly and no error messages, but I am not sure if this won't broke somethings ... should I try to make a patch for it, or does it have some caveats that I don't see?

Martin Petricek
--- mc-original/ChangeLog	2005-05-13 15:09:55.000000000 +0000
+++ mc-modified/ChangeLog	2005-05-29 16:10:23.000000000 +0000
@@ -0,0 +1,5 @@
+2005-05-29  Martin Petricek  <tux centrum cz> 
+
+	* lib/mc.ext.in: Added support for .7z archives
+       (if p7zip is installed)
+
--- mc-original/lib/mc.ext.in	2005-05-13 15:09:55.000000000 +0000
+++ mc-modified/lib/mc.ext.in	2005-05-29 16:10:23.000000000 +0000
@@ -143,6 +143,10 @@
 shell/.info
 	Open=info -f %f
 
+# 7zip archives (they are not man pages)
+shell/.7z
+	View=%view{ascii} 7za l %f 2>/dev/null
+
 # Manual page
 # Exception - .so libraries are not manual pages
 regex/\.(so|so\.[0-9\.]*)$


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]