kernel32: Fix GetVolumeInformation[AW] to require trailing \.
This commit is contained in:
parent
6f1390646c
commit
f7e6777e6e
|
@ -287,7 +287,6 @@ static void test_GetVolumeInformationA(void)
|
|||
/* check for error on no trailing \ */
|
||||
ret = pGetVolumeInformationA(Root_Dir0, vol_name_buf, vol_name_size, NULL,
|
||||
NULL, NULL, fs_name_buf, fs_name_len);
|
||||
todo_wine
|
||||
ok(!ret && GetLastError() == ERROR_INVALID_NAME,
|
||||
"GetVolumeInformationA w/o '\\' did not fail, last error %u\n", GetLastError());
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, DWORD label_len,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!root[0] || root[1] != ':')
|
||||
if (!root[0] || root[1] != ':' || root[lstrlenW(root)-1] != '\\' )
|
||||
{
|
||||
SetLastError( ERROR_INVALID_NAME );
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in New Issue