aboutsummaryrefslogtreecommitdiff
path: root/source/API/SBStream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/API/SBStream.cpp')
-rw-r--r--source/API/SBStream.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/API/SBStream.cpp b/source/API/SBStream.cpp
index 531ab9f463ce..f5b5c08411c7 100644
--- a/source/API/SBStream.cpp
+++ b/source/API/SBStream.cpp
@@ -82,6 +82,8 @@ SBStream::RedirectToFile (const char *path, bool append)
uint32_t open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
if (append)
open_options |= File::eOpenOptionAppend;
+ else
+ open_options |= File::eOpenOptionTruncate;
stream_file->GetFile().Open (path, open_options, lldb::eFilePermissionsFileDefault);
m_opaque_ap.reset (stream_file);