From d28df82ca5c33fa4be0f6ce1ffee58b8e447e20c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 6 Jul 2018 20:59:32 +0300 Subject: [PATCH] Actually pass sec_attr to CreateFile --- source/io/windows/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/io/windows/file.cpp b/source/io/windows/file.cpp index f6943ad..51fe814 100644 --- a/source/io/windows/file.cpp +++ b/source/io/windows/file.cpp @@ -38,7 +38,7 @@ void File::platform_init(const string &fn, CreateMode cm) sec_attr.lpSecurityDescriptor = 0; sec_attr.bInheritHandle = !!(mode&M_INHERIT); - *handle = CreateFile(fn.c_str(), flags, share_flags, 0, create_flags, FILE_ATTRIBUTE_NORMAL, 0); + *handle = CreateFile(fn.c_str(), flags, share_flags, 0, create_flags, FILE_ATTRIBUTE_NORMAL, &sec_attr); if(!handle) { int err = GetLastError(); -- 2.45.2