shell32/tests: Fix crash when launched from drive root dir.

This commit is contained in:
Nicolas Le Cam 2009-04-05 23:01:35 +02:00 committed by Alexandre Julliard
parent bf7fa5b690
commit 4955fabbd4
1 changed files with 4 additions and 4 deletions

View File

@ -818,8 +818,8 @@ static void test_GetAttributesOf(void)
win_skip("GetCurrentDirectoryA returned empty string. Skipping test_GetAttributesOf\n");
return;
}
if(cCurrDirA[len-1] == '\\')
cCurrDirA[len-1] = 0;
if (len > 3 && cCurrDirA[len-1] == '\\')
cCurrDirA[len-1] = 0;
/* create test directory */
CreateFilesFolders();
@ -862,7 +862,7 @@ static void test_GetAttributesOf(void)
hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags);
ok (SUCCEEDED(hr), "Desktop->GetAttributesOf() failed! hr = %08x\n", hr);
ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags);
/* free memory */
IMalloc_Free(ppM, newPIDL);
@ -871,7 +871,7 @@ static void test_GetAttributesOf(void)
Cleanup();
IShellFolder_Release(IDesktopFolder);
}
}
static void test_SHGetPathFromIDList(void)
{