summaryrefslogtreecommitdiffstats
path: root/stream/stream_smb.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_smb.c')
-rw-r--r--stream/stream_smb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_smb.c b/stream/stream_smb.c
index a9132eda69..c70207ee92 100644
--- a/stream/stream_smb.c
+++ b/stream/stream_smb.c
@@ -104,7 +104,7 @@ static int open_f (stream_t *stream, int mode, void *opts, int* file_format) {
if(mode == STREAM_READ)
m = O_RDONLY;
else if (mode == STREAM_WRITE) //who's gonna do that ?
- m = O_RDWR|O_CREAT;
+ m = O_RDWR|O_CREAT|O_TRUNC;
else {
mp_msg(MSGT_OPEN, MSGL_ERR, "[smb] Unknown open mode %d\n", mode);
m_struct_free (&stream_opts, opts);