aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zenstore/basicfile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/zenstore/basicfile.cpp b/zenstore/basicfile.cpp
index dd3598319..a1b9109b3 100644
--- a/zenstore/basicfile.cpp
+++ b/zenstore/basicfile.cpp
@@ -74,7 +74,7 @@ BasicFile::Open(std::filesystem::path FileName, bool IsCreate, std::error_code&
int OpenFlags = O_RDWR;
OpenFlags |= IsCreate ? O_CREAT|O_TRUNC : 0;
- int Fd = open(FileName.c_str(), O_RDWR, 0666);
+ int Fd = open(FileName.c_str(), OpenFlags, 0666);
if (Fd < 0)
{
Ec = zen::MakeErrorCodeFromLastError();