mirror of https://github.com/MidnightCommander/mc
Handle path /some/path/#vfsprefix:/path as /some/path#vfsprefix:/path
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
5b862005bd
commit
bd022573e5
|
@ -95,6 +95,15 @@ START_TEST (set_up_current_dir)
|
|||
|
||||
cd_and_check ("..", "/");
|
||||
|
||||
cd_and_check ("/dev/some.file/#test:/bla-bla", "/dev/some.file/#test:/bla-bla");
|
||||
|
||||
cd_and_check ("..", "/dev/some.file/#test:");
|
||||
|
||||
cd_and_check ("..", "/dev");
|
||||
|
||||
cd_and_check ("..", "/");
|
||||
|
||||
cd_and_check ("..", "/");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
|
|
|
@ -658,7 +658,26 @@ custom_canonicalize_pathname (char *path, CANON_PATH_FLAGS flags)
|
|||
continue;
|
||||
}
|
||||
if (*s == PATH_SEP)
|
||||
break;
|
||||
{
|
||||
/* skip VFS prefix */
|
||||
char *path_sep;
|
||||
struct vfs_class *vclass;
|
||||
|
||||
/* old parser mode */
|
||||
if (*(s + 1) != '#')
|
||||
break;
|
||||
|
||||
path_sep = strchr (s + 1, PATH_SEP);
|
||||
if (path_sep != NULL)
|
||||
*path_sep = '\0';
|
||||
|
||||
vclass = vfs_prefix_to_class (s + 2);
|
||||
if (path_sep != NULL)
|
||||
*path_sep = PATH_SEP;
|
||||
|
||||
if (vclass == NULL)
|
||||
break;
|
||||
}
|
||||
s--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue