Core/File: Add OpenMode_MustExit

Former-commit-id: 1df10e230d3c6ef71244060845b1fc02f7b5a8e9
This commit is contained in:
Lynix
2016-04-27 18:10:45 +02:00
parent 0d6727e746
commit 78469266fd
2 changed files with 7 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ namespace Nz
{
access |= GENERIC_READ;
if ((mode & OpenMode_WriteOnly) == 0)
if (mode & OpenMode_MustExit || (mode & OpenMode_WriteOnly) == 0)
openMode |= OPEN_EXISTING;
}
@@ -77,6 +77,8 @@ namespace Nz
if (mode & OpenMode_Truncate)
openMode |= CREATE_ALWAYS;
else if (mode & OpenMode_MustExit)
openMode |= OPEN_EXISTING;
else
openMode |= OPEN_ALWAYS;
}