]> wimlib.net Git - wimlib/commitdiff
win32_capture: pass proper path to scan callback
authorEric Biggers <ebiggers3@gmail.com>
Sun, 17 Jan 2016 17:34:50 +0000 (11:34 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 17 Jan 2016 17:58:27 +0000 (11:58 -0600)
NEWS
src/capture_common.c
src/win32_capture.c

diff --git a/NEWS b/NEWS
index 82632cd41a24c953c11b8284da763b52092cfb12..c9e05d314e5be4acd297aad711148d627c412370 100644 (file)
--- 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.
        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
 
        Added a new '--image-property' option to 'wimcapture', 'wimappend', and
        'wiminfo'.  This option lets you assign values to elements in a WIM
index 8279497113280b9a82e53882ceee0d08ce9a802a..3c06012462ec47e0ee9d353f67b9511b7dc1bb45 100644 (file)
@@ -53,6 +53,9 @@ int
 do_capture_progress(struct capture_params *params, int status,
                    const struct wim_inode *inode)
 {
 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))
        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.  */
        }
 
        /* 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,
                             &params->progress, params->progctx);
                             &params->progress, params->progctx);
+       progress_put_win32_path(cookie);
+       return ret;
 }
 
 /*
 }
 
 /*
index d6be1124204312a73152fa87e376cf2263631646..196342e6ed76699281d8d8220cb4e755fdb80614 100644 (file)
@@ -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';
 
        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);
 }
        params->progress.scan.symlink_target = print_name0;
        return do_capture_progress(params, scan_status, NULL);
 }
@@ -1755,7 +1755,7 @@ retry_open:
        }
 
 out_progress:
        }
 
 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
        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:
        }
 
 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
        if (likely(root))
                ret = do_capture_progress(ctx->params, WIMLIB_SCAN_DENTRY_OK, inode);
        else