Alexandre Julliard : advpack: Get rid of CharPrevW.
Module: wine Branch: master Commit: 9c08c46e1fd3162b3990a79ce732beaf66bc447b URL: http://source.winehq.org/git/wine.git/?a=commit;h=9c08c46e1fd3162b3990a79ce7... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 25 14:02:29 2007 +0200 advpack: Get rid of CharPrevW. --- dlls/advpack/files.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/dlls/advpack/files.c b/dlls/advpack/files.c index 134ed1c..163f994 100644 --- a/dlls/advpack/files.c +++ b/dlls/advpack/files.c @@ -331,7 +331,6 @@ static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags) DWORD fattrs = GetFileAttributesW(fname); HRESULT ret = E_FAIL; - static const WCHAR backslash[] = {'\\',0}; static const WCHAR asterisk[] = {'*',0}; static const WCHAR dot[] = {'.',0}; static const WCHAR dotdot[] = {'.','.',0}; @@ -344,11 +343,7 @@ static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags) int fname_len = lstrlenW(fname); /* Generate a path with wildcard suitable for iterating */ - if (lstrcmpW(CharPrevW(fname, fname + fname_len), backslash)) - { - lstrcpyW(fname + fname_len, backslash); - ++fname_len; - } + if (fname_len && fname[fname_len-1] != '\\') fname[fname_len++] = '\\'; lstrcpyW(fname + fname_len, asterisk); if ((hFindFile = FindFirstFileW(fname, &w32fd)) != INVALID_HANDLE_VALUE)
participants (1)
-
Alexandre Julliard