update: pass UTF-8 path to skip_symlink()
skip_symlinks() expects an UTF-8 encoded file name, but updateDirectory() passed ent->d_name (in file system encoding) to it. Convert it to UTF-8 first.
This commit is contained in:
committed by
Max Kellermann
parent
23b097593e
commit
7ac3abf499
@@ -389,12 +389,11 @@ updateDirectory(struct directory *directory, const struct stat *st)
|
|||||||
char *utf8;
|
char *utf8;
|
||||||
struct stat st2;
|
struct stat st2;
|
||||||
|
|
||||||
if (skip_path(ent->d_name) ||
|
if (skip_path(ent->d_name))
|
||||||
skip_symlink(directory, ent->d_name))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
utf8 = fs_charset_to_utf8(path_max_tmp, ent->d_name);
|
utf8 = fs_charset_to_utf8(path_max_tmp, ent->d_name);
|
||||||
if (!utf8)
|
if (utf8 == NULL || skip_symlink(directory, utf8))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (stat_directory_child(directory, utf8, &st2) == 0)
|
if (stat_directory_child(directory, utf8, &st2) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user