aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/file.c b/file.c
index 530ee488e..4d0ffc34e 100644
--- a/file.c
+++ b/file.c
@@ -955,6 +955,8 @@ struct ast_filestream *ast_writefile(const char *filename, const char *type, con
fs->filename = strdup(filename);
}
fs->vfs = NULL;
+ /* If truncated, we'll be at the beginning; if not truncated, then append */
+ f->seek(fs, 0, SEEK_END);
} else {
ast_log(LOG_WARNING, "Unable to rewrite %s\n", fn);
close(fd);