Commit 9c08c46e authored by Alexandre Julliard's avatar Alexandre Julliard

advpack: Get rid of CharPrevW.

parent 92ceff20
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment