Adding back FILE_FLAG_BACKUP_SEMANTICS.
This commit is contained in:
parent
74d71f7a4a
commit
76ed07cfff
|
@ -141,9 +141,9 @@ std::unique_ptr<FileHandle> FileHandle::OpenExisting(std::wstring path,
|
||||||
DWORD share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
DWORD share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
|
||||||
// We assume we've already created the file in the caller.
|
// We assume we've already created the file in the caller.
|
||||||
DWORD creation_disposition = OPEN_EXISTING;
|
DWORD creation_disposition = OPEN_EXISTING;
|
||||||
HANDLE handle =
|
HANDLE handle = CreateFileW(
|
||||||
CreateFileW(path.c_str(), open_access, share_mode, nullptr,
|
path.c_str(), open_access, share_mode, nullptr, creation_disposition,
|
||||||
creation_disposition, FILE_ATTRIBUTE_NORMAL, nullptr);
|
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, nullptr);
|
||||||
if (handle == INVALID_HANDLE_VALUE) {
|
if (handle == INVALID_HANDLE_VALUE) {
|
||||||
// TODO(benvanik): pick correct response.
|
// TODO(benvanik): pick correct response.
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in New Issue