Skip to content

Commit

Permalink
Apply create and truncate open flags, and set mode to u+rw,g+r
Browse files Browse the repository at this point in the history
  • Loading branch information
oluseyi committed Apr 4, 2020
1 parent 8a25ba0 commit 702b7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Psd/PsdNativeFile_Mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
std::wstring_convert<std::codecvt_utf8<wchar_t>,wchar_t> convert;
std::string s = convert.to_bytes(filename);
char const *cs = s.c_str();
m_fileDescriptor = open(cs, O_WRONLY);
m_fileDescriptor = open(cs, O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP);
if (m_fileDescriptor == -1)
{
PSD_ERROR("NativeFile", "Cannot obtain handle for file \"%ls\".", filename);
Expand Down

0 comments on commit 702b7a9

Please sign in to comment.