Set permissions to 644 when creating a file via open()
This commit is contained in:
parent
7b04bd8ef5
commit
7c4cd6ee7d
|
@ -249,7 +249,7 @@ std::unique_ptr<std::basic_streambuf<char>> NativeFileStream::makeFileBuffer(con
|
||||||
::IoUtilities::throwIoFailure("CreateFileW failed");
|
::IoUtilities::throwIoFailure("CreateFileW failed");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
const auto fileDescriptor = ::open(path.data(), nativeParams.openFlags);
|
const auto fileDescriptor = ::open(path.data(), nativeParams.openFlags, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||||
if (fileDescriptor == -1) {
|
if (fileDescriptor == -1) {
|
||||||
::IoUtilities::throwIoFailure("open failed");
|
::IoUtilities::throwIoFailure("open failed");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue