X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fntfs-capture.c;h=03c8720af1e568686e444e2bbfe5ec72f08a92cf;hp=31c8e56b513bec270bf857786fbf21ad4358383c;hb=237947e198385359a0c618b664d73bf4db36c405;hpb=670a54f5de37bff02c49f37d690b26654cf7fa1d diff --git a/src/ntfs-capture.c b/src/ntfs-capture.c index 31c8e56b..03c8720a 100644 --- a/src/ntfs-capture.c +++ b/src/ntfs-capture.c @@ -441,8 +441,8 @@ wim_ntfs_capture_filldir(void *dirent, const ntfschar *name, if (ret != 0 || name_type == FILE_NAME_DOS) goto out; } - ret = utf16le_to_mbs(name, name_nbytes, - &mbs_name, &mbs_name_nbytes); + ret = utf16le_to_tstr(name, name_nbytes, + &mbs_name, &mbs_name_nbytes); if (ret) goto out; @@ -508,10 +508,10 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_p, int ret; struct wim_dentry *root; - if (exclude_path(path, config, false)) { + if (exclude_path(path, path_len, config, false)) { /* Exclude a file or directory tree based on the capture * configuration file */ - if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_VERBOSE) + if ((add_image_flags & WIMLIB_ADD_IMAGE_FLAG_EXCLUDE_VERBOSE) && progress_func) { union wimlib_progress_info info; @@ -546,7 +546,8 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_p, } /* Create the new WIM dentry */ - ret = new_dentry_with_timeless_inode(path_basename(path), &root); + ret = new_dentry_with_timeless_inode(path_basename_with_len(path, path_len), + &root); if (ret) return ret;