mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-30 11:42:54 +03:00
Clarify handling of "#enc:".
* (vfs_canon): treate "#enc:" as a regular part of path in case of --disable-charset. * (realpath_test): likewise. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
8e55057fa3
commit
46ea5e2a99
@ -151,6 +151,7 @@ vfs_canon (const char *path)
|
||||
|
||||
char *local;
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
if (g_str_has_prefix (path, VFS_ENCODING_PREFIX))
|
||||
{
|
||||
/*
|
||||
@ -160,6 +161,7 @@ vfs_canon (const char *path)
|
||||
local = mc_build_filename (PATH_SEP_STR, path, (char *) NULL);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
const char *curr_dir;
|
||||
|
||||
|
@ -69,14 +69,24 @@ static const struct data_source
|
||||
{
|
||||
/* absolute paths */
|
||||
{ "/", "/"},
|
||||
{ "/" VFS_ENCODING_PREFIX "UTF-8/", "/" },
|
||||
{ "/usr/bin", "/usr/bin" },
|
||||
#ifdef HAVE_CHARSET
|
||||
{ "/" VFS_ENCODING_PREFIX "UTF-8/", "/" },
|
||||
{ "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/usr/bin" },
|
||||
#else
|
||||
{ "/" VFS_ENCODING_PREFIX "UTF-8/", "/" VFS_ENCODING_PREFIX "UTF-8/" },
|
||||
{ "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/" VFS_ENCODING_PREFIX "UTF-8/usr/bin" },
|
||||
#endif
|
||||
|
||||
/* relative paths are relative to / */
|
||||
{ VFS_ENCODING_PREFIX "UTF-8/", "/" },
|
||||
{ "usr/bin", "/usr/bin" },
|
||||
#ifdef HAVE_CHARSET
|
||||
{ VFS_ENCODING_PREFIX "UTF-8/", "/" },
|
||||
{ VFS_ENCODING_PREFIX "UTF-8/usr/bin", "/usr/bin" }
|
||||
#else
|
||||
{ VFS_ENCODING_PREFIX "UTF-8/", VFS_ENCODING_PREFIX "UTF-8/" },
|
||||
{ VFS_ENCODING_PREFIX "UTF-8/usr/bin", VFS_ENCODING_PREFIX "UTF-8/usr/bin" }
|
||||
#endif
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user