Fix saving problem (regression) with "Sysnative" alias in x86 binary

Removing the 'case sensitive' default flag FILE_FLAG_POSIX_SEMANTICS fixes the CreateFile ERROR_PATH_NOT_FOUND, when working with files like "C:\Windows\Sysnative\drivers\etc\hosts".

Without the FILE_FLAG_POSIX_SEMANTICS the WIN32 IO (CreateFile/WriteFile) way will be equivalent with the previously used POSIX IO (fopen/fwrite) way.

More info about this "Sysnative" alias: https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirector

Fix #11196, close #11225
This commit is contained in:
xomx 2022-02-17 09:28:16 +01:00 committed by Don Ho
parent 2321e648ae
commit b233c0c3e0
1 changed files with 1 additions and 1 deletions

View File

@ -59,5 +59,5 @@ private:
const DWORD _accessParam { GENERIC_READ | GENERIC_WRITE };
const DWORD _shareParam { FILE_SHARE_READ | FILE_SHARE_WRITE };
const DWORD _dispParam { CREATE_ALWAYS };
const DWORD _attribParam { FILE_ATTRIBUTE_NORMAL | FILE_FLAG_POSIX_SEMANTICS | FILE_FLAG_WRITE_THROUGH }; // FILE_FLAG_POSIX_SEMANTICS: distinguish between upper/lower case in name
const DWORD _attribParam { FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH };
};