]> wimlib.net Git - wimlib/blobdiff - src/ntfs-3g_capture.c
Windows: Use ntdll unconditionally
[wimlib] / src / ntfs-3g_capture.c
index 6bdb46484d7150d6c39f2940b95f920a6f9a0c8d..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;
@@ -567,7 +565,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
        }
 
        /* Create a WIM dentry with an associated inode, which may be shared */
-       ret = inode_table_new_dentry(&params->inode_table,
+       ret = inode_table_new_dentry(params->inode_table,
                                     path_basename_with_len(path, path_len),
                                     ni->mft_no, 0, false, &root);
        if (ret)
@@ -673,7 +671,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
                        ret = ntfs_get_ntfs_acl(&sec_ctx, ni, sd, ret);
                }
                if (ret > 0) {
-                       inode->i_security_id = sd_set_add_sd(&params->sd_set,
+                       inode->i_security_id = sd_set_add_sd(params->sd_set,
                                                             sd, ret);
                        if (inode->i_security_id == -1) {
                                ERROR("Out of memory");