]> wimlib.net Git - wimlib/blobdiff - src/ntfs-3g_capture.c
Rename add_image_params => capture_params
[wimlib] / src / ntfs-3g_capture.c
index af6fa5423de2208b98d3b927683ea336dfde119a..78199efa96fadc36d3a5058afbd7bdb91ffef292 100644 (file)
@@ -429,7 +429,7 @@ struct readdir_ctx {
        size_t path_len;
        struct dos_name_map *dos_name_map;
        ntfs_volume *vol;
        size_t path_len;
        struct dos_name_map *dos_name_map;
        ntfs_volume *vol;
-       struct add_image_params *params;
+       struct capture_params *params;
        int ret;
 };
 
        int ret;
 };
 
@@ -440,7 +440,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_p,
                                 size_t path_len,
                                 int name_type,
                                 ntfs_volume *ntfs_vol,
                                 size_t path_len,
                                 int name_type,
                                 ntfs_volume *ntfs_vol,
-                                struct add_image_params *params);
+                                struct capture_params *params);
 
 static int
 wim_ntfs_capture_filldir(void *dirent, const ntfschar *name,
 
 static int
 wim_ntfs_capture_filldir(void *dirent, const ntfschar *name,
@@ -527,7 +527,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret,
                                 size_t path_len,
                                 int name_type,
                                 ntfs_volume *vol,
                                 size_t path_len,
                                 int name_type,
                                 ntfs_volume *vol,
-                                struct add_image_params *params)
+                                struct capture_params *params)
 {
        u32 attributes;
        int ret;
 {
        u32 attributes;
        int ret;
@@ -704,10 +704,12 @@ out_progress:
        else
                ret = do_capture_progress(params, WIMLIB_SCAN_DENTRY_OK, inode);
 out:
        else
                ret = do_capture_progress(params, WIMLIB_SCAN_DENTRY_OK, inode);
 out:
-       if (ret == 0)
-               *root_ret = root;
-       else
+       if (unlikely(ret)) {
                free_dentry_tree(root, params->lookup_table);
                free_dentry_tree(root, params->lookup_table);
+               root = NULL;
+               ret = report_capture_error(params, ret, path);
+       }
+       *root_ret = root;
        return ret;
 }
 
        return ret;
 }
 
@@ -725,7 +727,7 @@ do_ntfs_umount(struct _ntfs_volume *vol)
 int
 build_dentry_tree_ntfs(struct wim_dentry **root_p,
                       const char *device,
 int
 build_dentry_tree_ntfs(struct wim_dentry **root_p,
                       const char *device,
-                      struct add_image_params *params)
+                      struct capture_params *params)
 {
        ntfs_volume *vol;
        ntfs_inode *root_ni;
 {
        ntfs_volume *vol;
        ntfs_inode *root_ni;