aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_http_post.c
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 23:05:43 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-13 23:05:43 +0000
commitaa252157fb232b2d10def4b1cdac16777acd9a61 (patch)
tree8449d434db4f756cea325241919fe3a95c52e13a /res/res_http_post.c
parentf4c87434056e864e8ab69c797fb8b626b71871ee (diff)
Fully overwrite a same-named file when uploading
(closes issue #14190) Reported by: timking git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168588 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_http_post.c')
-rw-r--r--res/res_http_post.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_http_post.c b/res/res_http_post.c
index 2770f52d8..9c8e06de5 100644
--- a/res/res_http_post.c
+++ b/res/res_http_post.c
@@ -72,7 +72,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;