Ticket #378 (closed defect: fixed)
cannot change into directories with names containing underscores
Reported by: | dd | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mc-core | Version: | 4.6.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: |
Description
version 4.6.1 & 4.6.2 on MacOS
When trying to change into a directory whose
name contains an underscore (e.g., "xxx_yyy"), mc prints "Warning:
Cannot change to xxx_yyy"). mc shows the contents of the directory
xxx_yyy, but the subshell remains in the parent directory (Ctrl+O
shows shell in parent dir). After that running a command from the subshell (e.g., "clear") will pop the mc panel display to the parent directory.
when running with no subshell (mc -u), mc changes directories
successfully.
Change History
comment:3 Changed 15 years ago by mcermak
This was fixed three years ago with changeset http://www.midnight-commander.org/changeset/eca5afad0fb148db1c1b1b6246d0b43da6746293 "* src/subshell.c (subshell_name_quote): Use the printf' utility instead of echo' to quote the directory name."
I confirm this annoying bug on Linux 32bit with bash 3.2
This bug in mc is also present in Linux using zsh shell:
http://www.zsh.org/mla/users/2009/msg00176.html
In all cases (and shells used) -u parameter of mc workarounds the bug.
This is not file/directory access rights issue - it happens on root account also.
The most visible/reproducible this bug is when accessing directory with underscore like a_b
Possible patch (I do not use it yet):
http://mail-index.netbsd.org/pkgsrc-users/2007/12/21/msg006862.html