Commit 8ebcf400 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

msvcrt/tests: Properly remove temporary directory.

parent 0646dfa5
...@@ -35,6 +35,7 @@ static void test_fullpath(void) ...@@ -35,6 +35,7 @@ static void test_fullpath(void)
{ {
char full[MAX_PATH]; char full[MAX_PATH];
char tmppath[MAX_PATH]; char tmppath[MAX_PATH];
char prevpath[MAX_PATH];
char level1[MAX_PATH]; char level1[MAX_PATH];
char level2[MAX_PATH]; char level2[MAX_PATH];
char teststring[MAX_PATH]; char teststring[MAX_PATH];
...@@ -42,6 +43,7 @@ static void test_fullpath(void) ...@@ -42,6 +43,7 @@ static void test_fullpath(void)
BOOL rc,free1,free2; BOOL rc,free1,free2;
free1=free2=TRUE; free1=free2=TRUE;
GetCurrentDirectory(MAX_PATH, prevpath);
GetTempPath(MAX_PATH,tmppath); GetTempPath(MAX_PATH,tmppath);
strcpy(level1,tmppath); strcpy(level1,tmppath);
strcat(level1,"msvcrt-test\\"); strcat(level1,"msvcrt-test\\");
...@@ -79,6 +81,7 @@ static void test_fullpath(void) ...@@ -79,6 +81,7 @@ static void test_fullpath(void)
ok(strcmp(freeme,teststring)==0,"Invalid Path returned %s\n",freeme); ok(strcmp(freeme,teststring)==0,"Invalid Path returned %s\n",freeme);
free(freeme); free(freeme);
SetCurrentDirectory(prevpath);
if (free2) if (free2)
RemoveDirectory(level2); RemoveDirectory(level2);
if (free1) if (free1)
......
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