[Pkg-mc-devel] Bug#517741: bzip2 compressed files cannot be edited

Mikael Hirki mikaelh at mbnet.fi
Sun Mar 1 19:43:37 UTC 2009

Package: mc
Version: 2:4.6.2~git20080311-4


mc displays an error message "Error reading from pipe: lzma -cd test.bz2
2>&1" when trying to edit a bzip2 compressed file.

Steps to reproduce:
$ echo test >test
$ bzip2 test
$ mc
Trying to edit the file test.bz2 produces the earlier error message.

This is probably caused by this little mistake in
05_add_lzma_support.patch which is included in the Debian patches.
--- a/edit/edit.c
+++ b/edit/edit.c
@@ -182,6 +182,7 @@ edit_load_file_fast (WEdit *edit, const char
 static const struct edit_filters {
     const char *read, *write, *extension;
 } all_filters[] = {
+    { "lzma -cd %s 2>&1",   "lzma > %s",   ".bz2" },
     { "bzip2 -cd %s 2>&1",  "bzip2 > %s",  ".bz2" },
     { "gzip -cd %s 2>&1",   "gzip > %s",   ".gz"  },
     { "gzip -cd %s 2>&1",   "gzip > %s",   ".Z"   }

The extension for lzma should be .lzma not .bz2.

More information about the Pkg-mc-devel mailing list