Use unicode constants for WCHAR
This commit is contained in:
parent
2a23eadada
commit
0a309fcbec
@ -59,24 +59,24 @@ static void drive_file_fix_path(WCHAR* path)
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
if (path[i] == '\\')
|
||||
path[i] = '/';
|
||||
if (path[i] == L'\\')
|
||||
path[i] = L'/';
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
if ((length == 3) && (path[1] == ':') && (path[2] == '/'))
|
||||
if ((length == 3) && (path[1] == L':') && (path[2] == L'/'))
|
||||
return;
|
||||
|
||||
#else
|
||||
|
||||
if ((length == 1) && (path[0] == '/'))
|
||||
if ((length == 1) && (path[0] == L'/'))
|
||||
return;
|
||||
|
||||
#endif
|
||||
|
||||
if ((length > 0) && (path[length - 1] == '/'))
|
||||
path[length - 1] = '\0';
|
||||
if ((length > 0) && (path[length - 1] == L'/'))
|
||||
path[length - 1] = L'\0';
|
||||
}
|
||||
|
||||
static WCHAR* drive_file_combine_fullpath(const WCHAR* base_path, const WCHAR* path,
|
||||
@ -126,8 +126,8 @@ static BOOL drive_file_remove_dir(const WCHAR* path)
|
||||
}
|
||||
|
||||
CopyMemory(path_slash, path, base_path_length);
|
||||
path_slash[base_path_length / 2] = '/';
|
||||
path_slash[base_path_length / 2 + 1] = '*';
|
||||
path_slash[base_path_length / 2] = L'/';
|
||||
path_slash[base_path_length / 2 + 1] = L'*';
|
||||
DEBUG_WSTR("Search in %s", path_slash);
|
||||
dir = FindFirstFileW(path_slash, &findFileData);
|
||||
path_slash[base_path_length / 2 + 1] = 0;
|
||||
@ -142,8 +142,8 @@ static BOOL drive_file_remove_dir(const WCHAR* path)
|
||||
{
|
||||
len = _wcslen(findFileData.cFileName);
|
||||
|
||||
if ((len == 1 && findFileData.cFileName[0] == '.') || (len == 2 &&
|
||||
findFileData.cFileName[0] == '.' && findFileData.cFileName[1] == '.'))
|
||||
if ((len == 1 && findFileData.cFileName[0] == L'.') || (len == 2 &&
|
||||
findFileData.cFileName[0] == L'.' && findFileData.cFileName[1] == L'.'))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -852,7 +852,3 @@ out_fail:
|
||||
Stream_Write_UINT8(output, 0); /* Padding */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user