aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 23:11:19 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 23:11:19 +0000
commit3dcab53d0cffc195a41bbe753502dcd1f9301a19 (patch)
treed74614ecef140912d556fae5e19fa72b79e6a235 /main
parent10d7857a8b5304f3f678de77f4979824961e78c6 (diff)
Merged revisions 168588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r168588 | twilson | 2009-01-13 17:05:43 -0600 (Tue, 13 Jan 2009) | 5 lines Fully overwrite a same-named file when uploading (closes issue #14190) Reported by: timking ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@168589 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/http.c b/main/http.c
index 79cfe5459..94a82bfcb 100644
--- a/main/http.c
+++ b/main/http.c
@@ -386,7 +386,7 @@ static void post_raw(GMimePart *part, const char *post_dir, const char *fn)
ast_debug(1, "Posting raw data to %s\n", filename);
- if ((fd = open(filename, O_CREAT | O_WRONLY, 0666)) == -1) {
+ if ((fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0666)) == -1) {
ast_log(LOG_WARNING, "Unable to open %s for writing file from a POST!\n", filename);
return;
}