mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
CreateDirectoryExW: Fail gracefully if directory name is null/empty.
svn path=/trunk/; revision=3744
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: dir.c,v 1.31 2002/09/08 10:22:41 chorns Exp $
|
||||
/* $Id: dir.c,v 1.32 2002/11/12 00:45:16 mdill Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
@@ -138,6 +138,13 @@ CreateDirectoryExW (
|
||||
|
||||
DPRINT ("lpTemplateDirectory %S lpNewDirectory %S lpSecurityAttributes %p\n",
|
||||
lpTemplateDirectory, lpNewDirectory, lpSecurityAttributes);
|
||||
|
||||
// Can't create empty directory
|
||||
if(lpNewDirectory == NULL || *lpNewDirectory == 0)
|
||||
{
|
||||
SetLastError(ERROR_PATH_NOT_FOUND);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (lpTemplateDirectory != NULL && *lpTemplateDirectory != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user