aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-10 11:08:05 +0800
committercrupest <crupest@outlook.com>2022-05-10 11:08:05 +0800
commitf25e220614b0d3a7db45f4b6e6c3dda686b9f66b (patch)
tree0512a779291b7d77db093b612c3f3151f2c0a390 /src
parent58e37eee64b13df9cf24cdfc97906e19b2898869 (diff)
downloadcru-f25e220614b0d3a7db45f4b6e6c3dda686b9f66b.tar.gz
cru-f25e220614b0d3a7db45f4b6e6c3dda686b9f66b.tar.bz2
cru-f25e220614b0d3a7db45f4b6e6c3dda686b9f66b.zip
...
Diffstat (limited to 'src')
-rw-r--r--src/common/platform/unix/UnixFileStream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/platform/unix/UnixFileStream.cpp b/src/common/platform/unix/UnixFileStream.cpp
index cf268288..7a44b92a 100644
--- a/src/common/platform/unix/UnixFileStream.cpp
+++ b/src/common/platform/unix/UnixFileStream.cpp
@@ -35,8 +35,8 @@ int MapOpenFileFlag(OpenFileFlag flags) {
result |= O_CREAT;
}
- if (flags & OpenFileFlags::ThrowOnExist) {
- result |= O_EXCL;
+ if (flags & OpenFileFlags::Truncate) {
+ result |= O_TRUNC;
}
return result;