Answer the question
In order to leave comments, you need to log in
Why does mc throw an error when entering a directory with a space in the name?
All this is done on the command line of the running mc.
I create a directory with a space in the name: # mkdir '/tmp/test test2'
Creates normally. I'm trying to go into it: # cd '/tmp/test test2'
mc throws out a red window with a message that the directory was not found. If you go to it by pressing 'enter' on the directory will display the message "Warning: cannot change to /tmp/test test2", but the directory's table of contents will show you can copy and delete files - from the panels. When trying to execute any command through the command line, the command is ignored, thrown into the top-level directory.
wtf?
mc 4.8.19, ext4
# uname -a
Linux geobase0 4.4.39-calculate #1 SMP PREEMPT Fri Jan 13 13:45:12 UTC 2017 x86_64 Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz GenuineIntel GNU/Linux
Answer the question
In order to leave comments, you need to log in
It's getting weirder and weirder...
This fucking message is issued by the following code:
if (bPathNotEq && mc_global.shell->type == SHELL_TCSH)
{
char rp_subshell_cwd[PATH_MAX];
char rp_current_panel_cwd[PATH_MAX];
char *p_subshell_cwd, *p_current_panel_cwd;
p_subshell_cwd = mc_realpath (subshell_cwd, rp_subshell_cwd);
p_current_panel_cwd = mc_realpath (pcwd, rp_current_panel_cwd);
if (p_subshell_cwd == NULL)
p_subshell_cwd = subshell_cwd;
if (p_current_panel_cwd == NULL)
p_current_panel_cwd = pcwd;
bPathNotEq = strcmp (p_subshell_cwd, p_current_panel_cwd) != 0;
}
if (bPathNotEq && !DIR_IS_DOT (pcwd))
{
char *cwd;
cwd =
vfs_path_to_str_flags (subshell_get_cwd_from_current_panel (), 0,
VPF_STRIP_PASSWORD);
vfs_print_message (_("Warning: Cannot change to %s.\n"), cwd);
g_free (cwd);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question