Skip to content

Commit

Permalink
Merge Linux create call (mr-632)
Browse files Browse the repository at this point in the history
fb6ac2c - fix(vfs): linux create call
  • Loading branch information
prikolium-cfx committed Dec 17, 2024
2 parents 645f7c8 + fb6ac2c commit c970038
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/components/vfs-impl-server/src/PlatformDevice.Posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ Device::THandle LocalDevice::OpenBulk(const std::string& fileName, uint64_t* ptr

Device::THandle LocalDevice::Create(const std::string& filename, bool createIfExists, bool append)
{
mode_t mode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
int flags = O_CREAT;
int flags = O_CREAT|O_WRONLY;
if (createIfExists)
{
flags |= O_TRUNC;
Expand All @@ -50,7 +49,7 @@ Device::THandle LocalDevice::Create(const std::string& filename, bool createIfEx
flags |= O_APPEND;
}

int fd = open(filename.c_str(), flags, mode);
int fd = open(filename.c_str(), flags, 0755);

if (fd < 0)
{
Expand Down

0 comments on commit c970038

Please sign in to comment.