summary refs log tree commit diff
path: root/pkgs/tools/misc/mc/mc-4.6.1-bash32-1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/misc/mc/mc-4.6.1-bash32-1.patch')
-rw-r--r--pkgs/tools/misc/mc/mc-4.6.1-bash32-1.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/misc/mc/mc-4.6.1-bash32-1.patch b/pkgs/tools/misc/mc/mc-4.6.1-bash32-1.patch
new file mode 100644
index 000000000000..d6d55a027074
--- /dev/null
+++ b/pkgs/tools/misc/mc/mc-4.6.1-bash32-1.patch
@@ -0,0 +1,41 @@
+Submitted By: Alexander E. Patrakov
+Date: 2007-01-19
+Initial Package Version: 4.6.1
+Origin: http://bugs.gentoo.org/show_bug.cgi?id=153925
+Upstream Status: aware of the problem
+Description: with bash-3.2, unpatched mc-4.6.1 refuses to go into directories
+containing underscores or other strange characters.
+
+--- mc-4.6.1/src/subshell.c.000	2006-05-08 23:11:48.000000000 +0200
++++ mc-4.6.1/src/subshell.c	2006-10-28 15:40:46.000000000 +0200
+@@ -745,29 +745,13 @@ subshell_name_quote (const char *s)
+     memcpy (d, cmd_start, len);
+     d += len;
+ 
+-    /*
+-     * Print every character in octal format with the leading backslash.
+-     * tcsh and zsh may require 4-digit octals, bash < 2.05b doesn't like them.
+-     */
+-    if (subshell_type == BASH) {
+ 	for (; *s; s++) {
+-	    /* Must quote numbers, so that they are not glued to octals */
+ 	    if (isalpha ((unsigned char) *s)) {
+ 		*d++ = (unsigned char) *s;
+ 	    } else {
+-		sprintf (d, "\\%03o", (unsigned char) *s);
+-		d += 4;
+-	    }
+-	}
+-    } else {
+-	for (; *s; s++) {
+-	    if (isalnum ((unsigned char) *s)) {
+-		*d++ = (unsigned char) *s;
+-	    } else {
+ 		sprintf (d, "\\0%03o", (unsigned char) *s);
+ 		d += 5;
+ 	    }
+-	}
+     }
+ 
+     memcpy (d, common_end, sizeof (common_end));
+