From: Mikko Rasa Date: Fri, 6 Jul 2018 17:59:32 +0000 (+0300) Subject: Actually pass sec_attr to CreateFile X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d28df82ca5c33fa4be0f6ce1ffee58b8e447e20c;p=libs%2Fcore.git Actually pass sec_attr to CreateFile --- 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();