mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-25 07:29:55 +02:00
Provide file permissions for newly created file
Since O_CREAT is passed, we have to provide permission flags too.
This commit is contained in:
parent
4550eebc90
commit
b938c41067
@ -92,7 +92,7 @@ constexpr int writeOpenFlags =
|
||||
bool writeStringToFile(string const& filename, string const& data) {
|
||||
// Open temporary file.
|
||||
string tempname = filename + '~';
|
||||
int fd = open(tempname.c_str(), writeOpenFlags);
|
||||
int fd = open(tempname.c_str(), writeOpenFlags, S_IRUSR | S_IWUSR);
|
||||
if (fd < 0) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user