Merge from HEAD: r14219, r14220
Allow the lpTemplateDirectory parameter to be NULL in CreateDirectoryExA.
Modified: branches/ros-branch-0_2_6/reactos/lib/kernel32/file/dir.c

Modified: branches/ros-branch-0_2_6/reactos/lib/kernel32/file/dir.c
--- branches/ros-branch-0_2_6/reactos/lib/kernel32/file/dir.c	2005-03-23 17:12:58 UTC (rev 14283)
+++ branches/ros-branch-0_2_6/reactos/lib/kernel32/file/dir.c	2005-03-23 17:19:12 UTC (rev 14284)
@@ -50,11 +50,12 @@
         LPCSTR                  lpNewDirectory,
         LPSECURITY_ATTRIBUTES   lpSecurityAttributes)
 {
-   PWCHAR TemplateDirectoryW;
-   PWCHAR NewDirectoryW;   
+   PWCHAR TemplateDirectoryW = NULL;
+   PWCHAR NewDirectoryW = NULL;
    BOOL ret;
 
-   if (!(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, FALSE)))
+   if (lpTemplateDirectory != NULL &&
+       !(TemplateDirectoryW = FilenameA2W(lpTemplateDirectory, FALSE)))
       return FALSE;
       
    if (!(NewDirectoryW = FilenameA2W(lpNewDirectory, TRUE)))