X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fwin32_capture.c;h=97855b3beb389453f655bbd3343a070512e2e575;hp=6e3552f55ffed1829e06dbbb1421a9968f6f9599;hb=5816eba3f41b63910c5d932a8ed22a2c9f65c492;hpb=9655f89082b186f7748485c6ee42c878274fdb25 diff --git a/src/win32_capture.c b/src/win32_capture.c index 6e3552f5..97855b3b 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -1133,7 +1133,6 @@ win32_build_dentry_tree_recursive(struct wim_dentry **root_ret, HANDLE hFile; DWORD desiredAccess; - params->progress.scan.cur_path = path; if (exclude_path(path, path_num_chars, params->config, true)) { if (params->add_flags & WIMLIB_ADD_FLAG_ROOT) { @@ -1141,7 +1140,8 @@ win32_build_dentry_tree_recursive(struct wim_dentry **root_ret, ret = WIMLIB_ERR_INVALID_CAPTURE_CONFIG; goto out; } - do_capture_progress(params, WIMLIB_SCAN_DENTRY_EXCLUDED); + params->progress.scan.cur_path = path; + do_capture_progress(params, WIMLIB_SCAN_DENTRY_EXCLUDED, NULL); ret = 0; goto out; } @@ -1158,8 +1158,6 @@ win32_build_dentry_tree_recursive(struct wim_dentry **root_ret, } #endif - do_capture_progress(params, WIMLIB_SCAN_DENTRY_OK); - desiredAccess = FILE_READ_DATA | FILE_READ_ATTRIBUTES | READ_CONTROL | ACCESS_SYSTEM_SECURITY; again: @@ -1232,8 +1230,10 @@ again: inode = root->d_inode; - if (inode->i_nlink > 1) /* Shared inode; nothing more to do */ - goto out_close_handle; + if (inode->i_nlink > 1) { + /* Shared inode; nothing more to do */ + goto out_progress_ok; + } inode->i_attributes = file_info.dwFileAttributes; inode->i_creation_time = FILETIME_to_u64(&file_info.ftCreationTime); @@ -1299,6 +1299,10 @@ again: state, vol_flags); } + path[path_num_chars] = '\0'; +out_progress_ok: + params->progress.scan.cur_path = path; + do_capture_progress(params, WIMLIB_SCAN_DENTRY_OK, inode); out_close_handle: CloseHandle(hFile); out: