Skip to content
Snippets Groups Projects
Commit 60b435ce authored by Terry Wilson's avatar Terry Wilson
Browse files

Fully overwrite a same-named file when uploading

(closes issue #14190)
Reported by: timking


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 7c6d9c72
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment