diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-13 23:14:29 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-01-13 23:14:29 +0000 |
commit | 6a2ffa2c48ed9227eb6e402a7e7522b0c093881e (patch) | |
tree | e6710e2324547c67fc540a878e99a114a2c1f9bc /res | |
parent | aeeccd2df1ee66ecdfa8baaaf0930ce749c8cc06 (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.1@168590 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r-- | res/res_http_post.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_http_post.c b/res/res_http_post.c index 39816da76..5fbf46a24 100644 --- a/res/res_http_post.c +++ b/res/res_http_post.c @@ -69,7 +69,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; |