Core/File: Add OpenMode_MustExit
Former-commit-id: 1df10e230d3c6ef71244060845b1fc02f7b5a8e9
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user