X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fprogress.c;h=5696fbae87435284725c154c55dd2f32eb881b88;hp=cdf014737786df2534ccc1669ad9176198f7fe1b;hb=d31b2fee211b1c31420bafe1c2379f6f89bd92fe;hpb=f18b7fc3361c4daac0ddd104af65a8eff8466fec;ds=sidebyside diff --git a/src/progress.c b/src/progress.c index cdf01473..5696fbae 100644 --- a/src/progress.c +++ b/src/progress.c @@ -23,8 +23,6 @@ # include "config.h" #endif -#include - #include "wimlib/progress.h" int @@ -33,6 +31,7 @@ report_error(wimlib_progress_func_t progfunc, { int ret; union wimlib_progress_info progress; + tchar *cookie; if (error_code == WIMLIB_ERR_SUCCESS || error_code == WIMLIB_ERR_ABORTED_BY_PROGRESS || @@ -43,25 +42,12 @@ report_error(wimlib_progress_func_t progfunc, progress.handle_error.error_code = error_code; progress.handle_error.will_ignore = false; -#ifdef __WIN32__ - /* Hack for Windows... */ - - wchar_t *p_question_mark = NULL; - - if (!wcsncmp(path, L"\\??\\", 4)) { - /* Trivial transformation: NT namespace => Win32 namespace */ - p_question_mark = (wchar_t *)&path[1]; - *p_question_mark = L'\\'; - } -#endif + cookie = progress_get_win32_path(path); ret = call_progress(progfunc, WIMLIB_PROGRESS_MSG_HANDLE_ERROR, &progress, progctx); -#ifdef __WIN32__ - if (p_question_mark) - *p_question_mark = L'?'; -#endif + progress_put_win32_path(cookie); if (ret) return ret;