X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fntfs-3g_capture.c;h=78199efa96fadc36d3a5058afbd7bdb91ffef292;hp=5bc9563e862557f005bb79093aabfcf67753afe7;hb=79d279cf4581fc0295576e33a28faf65686bee2c;hpb=c64549817d956075c0489661eac56128ee6fa630 diff --git a/src/ntfs-3g_capture.c b/src/ntfs-3g_capture.c index 5bc9563e..78199efa 100644 --- a/src/ntfs-3g_capture.c +++ b/src/ntfs-3g_capture.c @@ -8,20 +8,18 @@ /* * Copyright (C) 2012, 2013, 2014 Eric Biggers * - * This file is part of wimlib, a library for working with WIM files. + * This file is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at your option) any + * later version. * - * wimlib is free software; you can redistribute it and/or modify it under the - * terms of the GNU General Public License as published by the Free - * Software Foundation; either version 3 of the License, or (at your option) - * any later version. - * - * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU General Public License for more + * This file is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * - * You should have received a copy of the GNU General Public License - * along with wimlib; if not, see http://www.gnu.org/licenses/. + * You should have received a copy of the GNU Lesser General Public License + * along with this file; if not, see http://www.gnu.org/licenses/. */ #ifdef HAVE_CONFIG_H @@ -431,7 +429,7 @@ struct readdir_ctx { 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; }; @@ -442,7 +440,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_p, 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, @@ -529,7 +527,7 @@ build_dentry_tree_ntfs_recursive(struct wim_dentry **root_ret, size_t path_len, int name_type, ntfs_volume *vol, - struct add_image_params *params) + struct capture_params *params) { u32 attributes; int ret; @@ -706,10 +704,12 @@ out_progress: 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); + root = NULL; + ret = report_capture_error(params, ret, path); + } + *root_ret = root; return ret; } @@ -727,7 +727,7 @@ do_ntfs_umount(struct _ntfs_volume *vol) 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;