lib/path: clarify conditions for creating converters

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
Yury V. Zaytsev 2024-09-13 09:26:53 +02:00
parent ffd6fd11f7
commit 07e24c0289

View File

@ -896,8 +896,8 @@ vfs_path_element_clone (const vfs_path_element_t *element)
new_element->vfs_prefix = g_strdup (element->vfs_prefix); new_element->vfs_prefix = g_strdup (element->vfs_prefix);
#ifdef HAVE_CHARSET #ifdef HAVE_CHARSET
new_element->encoding = g_strdup (element->encoding); new_element->encoding = g_strdup (element->encoding);
if (vfs_path_element_need_cleanup_converter (element) && new_element->encoding != NULL) if (vfs_path_element_need_cleanup_converter (element) && element->encoding != NULL)
new_element->dir.converter = str_crt_conv_from (new_element->encoding); new_element->dir.converter = str_crt_conv_from (element->encoding);
else else
new_element->dir.converter = element->dir.converter; new_element->dir.converter = element->dir.converter;
#endif #endif