]> git.tdb.fi Git - libs/core.git/commitdiff
Actually pass sec_attr to CreateFile
authorMikko Rasa <tdb@tdb.fi>
Fri, 6 Jul 2018 17:59:32 +0000 (20:59 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 6 Jul 2018 17:59:32 +0000 (20:59 +0300)
source/io/windows/file.cpp

index f6943adb3cb397cf3be67c8f76f4a9989cd9a2d2..51fe814a5e29b197f8843d3f4ae1d31653718297 100644 (file)
@@ -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();