]> wimlib.net Git - wimlib/blobdiff - src/ntfs-3g_capture.c
Windows: Use ntdll unconditionally
[wimlib] / src / ntfs-3g_capture.c
index ee301477f4dab3ecbd7359a691e1e4b23f392b09..48bbc482410e73c0f8685f452dfcb7a1c8f309ab 100644 (file)
@@ -394,12 +394,10 @@ set_dentry_dos_name(struct wim_dentry *dentry, const struct dos_name_map *map)
        if (dentry->is_win32_name) {
                node = lookup_dos_name(map, dentry->d_inode->i_ino);
                if (node) {
-                       dentry->short_name = MALLOC(node->name_nbytes + 2);
+                       dentry->short_name = utf16le_dupz(node->dos_node,
+                                                         node->name_nbytes);
                        if (!dentry->short_name)
                                return WIMLIB_ERR_NOMEM;
-                       memcpy(dentry->short_name, node->dos_name,
-                              node->name_nbytes);
-                       dentry->short_name[node->name_nbytes / 2] = 0;
                        dentry->short_name_nbytes = node->name_nbytes;
                        DEBUG("Assigned DOS name to ino %"PRIu64,
                              dentry->d_inode->i_ino);
@@ -536,7 +534,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
        struct wim_dentry *root = NULL;
        struct wim_inode *inode = NULL;
 
-       if (exclude_path(path, path_len, params->config, false)) {
+       if (should_exclude_path(path, path_len, params->config)) {
                /* Exclude a file or directory tree based on the capture
                 * configuration file.  */
                ret = 0;