Allow the lpTemplateDirectory parameter to be NULL in CreateDirectoryExA.

svn path=/trunk/; revision=14219
This commit is contained in:
Filip Navara 2005-03-20 13:10:11 +00:00
parent 439e6fd789
commit 2d8afa8978

View file

@ -50,11 +50,12 @@ CreateDirectoryExA (
LPCSTR lpNewDirectory,
LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{
PWCHAR TemplateDirectoryW;
PWCHAR NewDirectoryW;
PWCHAR TemplateDirectoryW = NULL;
PWCHAR NewDirectoryW = NULL;
BOOL ret;
if (!(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, FALSE)))
if (TemplateDirectoryW != NULL &&
!(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, FALSE)))
return FALSE;
if (!(NewDirectoryW = FilenameA2W(lpNewDirectory, TRUE)))