corrected the last error to check for when determining if the file already exists (when using CreateFile with CREATE_NEW)

svn path=/trunk/; revision=11969
This commit is contained in:
Gunnar Dalsnes 2004-12-06 14:45:47 +00:00
parent 018e3f9601
commit c1a2a1d3de

View file

@ -1,4 +1,4 @@
/* $Id: file.c,v 1.60 2004/10/31 01:36:37 weiden Exp $
/* $Id: file.c,v 1.61 2004/12/06 14:45:47 gdalsnes Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@ -993,7 +993,7 @@ GetTempFileNameA(LPCSTR lpPathName,
CREATE_NEW, FILE_ATTRIBUTE_TEMPORARY,
0)) == INVALID_HANDLE_VALUE)
{
if (GetLastError() != ERROR_ALREADY_EXISTS)
if (GetLastError() != ERROR_FILE_EXISTS)
{
return 0;
}
@ -1041,7 +1041,7 @@ GetTempFileNameW(LPCWSTR lpPathName,
CREATE_NEW, FILE_ATTRIBUTE_TEMPORARY,
0)) == INVALID_HANDLE_VALUE)
{
if (GetLastError() != ERROR_ALREADY_EXISTS)
if (GetLastError() != ERROR_FILE_EXISTS)
{
return 0;
}