From: Eric Biggers Date: Sun, 17 Jan 2016 17:34:50 +0000 (-0600) Subject: win32_capture: pass proper path to scan callback X-Git-Tag: v1.9.0~20 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=1c142989478a3e670fbb6953d98adfa988441e5b win32_capture: pass proper path to scan callback --- diff --git a/NEWS b/NEWS index 82632cd4..c9e05d31 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ Version 1.9.0-BETA: have been slightly tweaked. Progress information for directory tree scans now counts all hard links. + Also, on Windows "\\?\" is no longer stripped from the current path. Added a new '--image-property' option to 'wimcapture', 'wimappend', and 'wiminfo'. This option lets you assign values to elements in a WIM diff --git a/src/capture_common.c b/src/capture_common.c index 82794971..3c060124 100644 --- a/src/capture_common.c +++ b/src/capture_common.c @@ -53,6 +53,9 @@ int do_capture_progress(struct capture_params *params, int status, const struct wim_inode *inode) { + int ret; + tchar *cookie; + switch (status) { case WIMLIB_SCAN_DENTRY_OK: if (!(params->add_flags & WIMLIB_ADD_FLAG_VERBOSE)) @@ -93,8 +96,12 @@ do_capture_progress(struct capture_params *params, int status, } /* Call the user-provided progress function. */ - return call_progress(params->progfunc, WIMLIB_PROGRESS_MSG_SCAN_DENTRY, + + cookie = progress_get_win32_path(params->progress.scan.cur_path); + ret = call_progress(params->progfunc, WIMLIB_PROGRESS_MSG_SCAN_DENTRY, ¶ms->progress, params->progctx); + progress_put_win32_path(cookie); + return ret; } /* diff --git a/src/win32_capture.c b/src/win32_capture.c index d6be1124..196342e6 100644 --- a/src/win32_capture.c +++ b/src/win32_capture.c @@ -856,7 +856,7 @@ winnt_rpfix_progress(struct capture_params *params, const wchar_t *path, wmemcpy(print_name0, link->print_name, print_name_nchars); print_name0[print_name_nchars] = L'\0'; - params->progress.scan.cur_path = printable_path(path); + params->progress.scan.cur_path = path; params->progress.scan.symlink_target = print_name0; return do_capture_progress(params, scan_status, NULL); } @@ -1755,7 +1755,7 @@ retry_open: } out_progress: - ctx->params->progress.scan.cur_path = printable_path(full_path); + ctx->params->progress.scan.cur_path = full_path; if (likely(root)) ret = do_capture_progress(ctx->params, WIMLIB_SCAN_DENTRY_OK, inode); else @@ -2714,7 +2714,7 @@ generate_wim_structures_recursive(struct wim_dentry **root_ret, } out_progress: - ctx->params->progress.scan.cur_path = printable_path(path); + ctx->params->progress.scan.cur_path = path; if (likely(root)) ret = do_capture_progress(ctx->params, WIMLIB_SCAN_DENTRY_OK, inode); else