X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fmount_image.c;fp=src%2Fmount_image.c;h=e2f0ffbccac4e4f7498809adaf658fac3a71a631;hp=0ae5f2162c2397a9887c20ab1e2ea38b4e0e1e4a;hb=8df639463ae0c754d2b1af3d6c1d22e59ee3ccf8;hpb=6460a27c606eed49e900c73a3316ac12d77a3a2e diff --git a/src/mount_image.c b/src/mount_image.c index 0ae5f216..e2f0ffbc 100644 --- a/src/mount_image.c +++ b/src/mount_image.c @@ -1712,18 +1712,15 @@ wimfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, return ret; for_inode_child(child, inode) { - char *file_name_mbs; - size_t file_name_mbs_nbytes; + char *name; + size_t name_nbytes; - ret = utf16le_to_tstr(child->file_name, - child->file_name_nbytes, - &file_name_mbs, - &file_name_mbs_nbytes); - if (ret) + if (utf16le_to_tstr(child->d_name, child->d_name_nbytes, + &name, &name_nbytes)) return -errno; - ret = filler(buf, file_name_mbs, NULL, 0); - FREE(file_name_mbs); + ret = filler(buf, name, NULL, 0); + FREE(name); if (ret) return ret; }