mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Removed vfs_path_t->unparsed_encoding.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
ebe519ef15
commit
b0df841a4a
@ -455,8 +455,8 @@ mc_opendir (const char *dirname)
|
||||
path_element->dir.info = info;
|
||||
|
||||
path_element->dir.converter =
|
||||
(vpath->unparsed_encoding !=
|
||||
NULL) ? str_crt_conv_from (vpath->unparsed_encoding) : str_cnv_from_term;
|
||||
(path_element->encoding !=
|
||||
NULL) ? str_crt_conv_from (path_element->encoding) : str_cnv_from_term;
|
||||
if (path_element->dir.converter == INVALID_CONV)
|
||||
path_element->dir.converter = str_cnv_from_term;
|
||||
|
||||
@ -511,7 +511,8 @@ mc_readdir (DIR * dirp)
|
||||
if (entry == NULL)
|
||||
return NULL;
|
||||
g_string_set_size (vfs_str_buffer, 0);
|
||||
state = str_vfs_convert_from (vfs_path_element->dir.converter, entry->d_name, vfs_str_buffer);
|
||||
state =
|
||||
str_vfs_convert_from (vfs_path_element->dir.converter, entry->d_name, vfs_str_buffer);
|
||||
mc_readdir_result->d_ino = entry->d_ino;
|
||||
g_strlcpy (mc_readdir_result->d_name, vfs_str_buffer->str, MAXNAMLEN + 1);
|
||||
}
|
||||
|
@ -260,7 +260,6 @@ vfs_path_from_str (const char *path_str)
|
||||
return NULL;
|
||||
|
||||
vpath = vfs_path_new ();
|
||||
vpath->unparsed_encoding = g_strdup (vfs_get_encoding (path_str));
|
||||
vpath->unparsed = vfs_canon_and_translate (path_str);
|
||||
if (vpath->unparsed == NULL)
|
||||
{
|
||||
@ -276,6 +275,10 @@ vfs_path_from_str (const char *path_str)
|
||||
if (local == NULL)
|
||||
local = "";
|
||||
element->path = g_strdup (local);
|
||||
|
||||
element->encoding = g_strdup (vfs_get_encoding (path));
|
||||
element->dir.converter = INVALID_CONV;
|
||||
|
||||
element->raw_url_str = g_strdup (op);
|
||||
vpath->path = g_list_prepend (vpath->path, element);
|
||||
}
|
||||
@ -383,7 +386,6 @@ vfs_path_free (vfs_path_t * path)
|
||||
g_list_foreach (path->path, (GFunc) vfs_path_element_free, NULL);
|
||||
g_list_free (path->path);
|
||||
g_free (path->unparsed);
|
||||
g_free (path->unparsed_encoding);
|
||||
g_free (path);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,6 @@ typedef struct
|
||||
{
|
||||
GList *path;
|
||||
char *unparsed;
|
||||
char *unparsed_encoding;
|
||||
} vfs_path_t;
|
||||
|
||||
typedef struct
|
||||
@ -23,7 +22,8 @@ typedef struct
|
||||
struct vfs_class *class;
|
||||
char *encoding;
|
||||
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
GIConv converter;
|
||||
DIR *info;
|
||||
} dir;
|
||||
|
Loading…
Reference in New Issue
Block a user