diff options
| author | Martin Ridgers <[email protected]> | 2021-11-17 09:32:47 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-17 09:32:47 +0100 |
| commit | 4f887eda1c0f80877a5319b9ddb83343544a7e60 (patch) | |
| tree | ec379e0bdee77f87fef0bb62e7815ca44bd8f9e1 /zencore/filesystem.cpp | |
| parent | Corrected flags to open() so behaviour matches Windows' CREATE_ALWAYS (diff) | |
| download | zen-4f887eda1c0f80877a5319b9ddb83343544a7e60.tar.xz zen-4f887eda1c0f80877a5319b9ddb83343544a7e60.zip | |
Set correct read-write file modes on WriteFile() output
Diffstat (limited to 'zencore/filesystem.cpp')
| -rw-r--r-- | zencore/filesystem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index a4c81f6cc..f594076c3 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -546,11 +546,11 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer #else int OpenFlags = O_WRONLY|O_CREAT|O_TRUNC; - int Fd = open(Path.c_str(), OpenFlags); + int Fd = open(Path.c_str(), OpenFlags, 0666); if (Fd < 0) { zen::CreateDirectories(Path.parent_path()); - Fd = open(Path.c_str(), OpenFlags); + Fd = open(Path.c_str(), OpenFlags, 0666); } if (Fd < 0) |