Commit f7e6777e authored by Guy Albertelli's avatar Guy Albertelli Committed by Alexandre Julliard

kernel32: Fix GetVolumeInformation[AW] to require trailing \.

parent 6f139064
......@@ -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;
......
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