From 78dd033988cdb53e264417ff82cfba32cec0a045 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 24 Jul 2019 15:30:50 +0300 Subject: [PATCH] Fix call to CreateFile2. GitOrigin-RevId: 71fad1b8484402e997b07641552205894d0e1c3e --- tdutils/td/utils/port/FileFd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tdutils/td/utils/port/FileFd.cpp b/tdutils/td/utils/port/FileFd.cpp index 721fee88b..16446f8c9 100644 --- a/tdutils/td/utils/port/FileFd.cpp +++ b/tdutils/td/utils/port/FileFd.cpp @@ -198,6 +198,8 @@ Result FileFd::open(CSlice filepath, int32 flags, int32 mode) { #else CREATEFILE2_EXTENDED_PARAMETERS extended_parameters; std::memset(&extended_parameters, 0, sizeof(extended_parameters)); + extended_parameters.dwSize = sizeof(extended_parameters); + extended_parameters.dwFileAttributes = FILE_ATTRIBUTE_NORMAL; extended_parameters.dwFileFlags = native_flags; auto handle = CreateFile2(w_filepath.c_str(), desired_access, share_mode, creation_disposition, &extended_parameters); #endif