Remove trailing backslash.

This commit is contained in:
Saulius Krasuckas 2005-08-08 18:03:47 +00:00 committed by Alexandre Julliard
parent 0c206b940c
commit c3760e7de1
2 changed files with 17 additions and 0 deletions

View File

@ -64,7 +64,14 @@ static BOOL file_exists(const CHAR *name)
/* initializes the tests */
static void init_shfo_tests(void)
{
int len;
GetCurrentDirectoryA(MAX_PATH, CURR_DIR);
len = lstrlenA(CURR_DIR);
if(len && (CURR_DIR[len-1] == '\\'))
CURR_DIR[len-1] = 0;
createTestFile(".\\test1.txt");
createTestFile(".\\test2.txt");
createTestFile(".\\test3.txt");

View File

@ -621,9 +621,19 @@ static void test_EnumObjects_and_CompareIDs(void)
char cCurrDirA [MAX_PATH] = {0};
WCHAR cCurrDirW [MAX_PATH];
static const WCHAR cTestDirW[] = {'\\','t','e','s','t','d','i','r',0};
int len;
HRESULT hr;
GetCurrentDirectoryA(MAX_PATH, cCurrDirA);
len = lstrlenA(cCurrDirA);
if(len == 0) {
trace("GetCurrentDirectoryA returned empty string. Skipping test_EnumObjects_and_CompareIDs\n");
return;
}
if(cCurrDirA[len-1] == '\\')
cCurrDirA[len-1] = 0;
MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
strcatW(cCurrDirW, cTestDirW);