diff options
Diffstat (limited to 'hugin.c')
-rw-r--r-- | hugin.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -230,7 +230,8 @@ hug_status_t hug_init(unsigned int flags, ...) case HUG_OPTION_FILENAME: if(hug_config.flags & HUG_FLAG_OUTPUT_TO_FILE) { hug_config.filename = strdup((const char*)va_arg(vl, char*)); - hug_config.file_fd = open(hug_config.filename, O_CREAT | O_RDWR, 0777); + hug_config.file_fd = open(hug_config.filename, + O_CREAT | O_APPEND | O_RDWR, 0777); if(hug_config.file_fd == -1) { fprintf(stderr, "Could not open logfile for writing: %s\n", hug_config.filename); @@ -291,7 +292,8 @@ hug_status_t hugin_reopen_log() if((hug_config.flags & HUG_FLAG_OUTPUT_TO_FILE) == 0) return HUG_STATUS_OK; close(hug_config.file_fd); - hug_config.file_fd = open(hug_config.filename, O_CREAT | O_RDWR, 0777); + hug_config.file_fd = open(hug_config.filename, + O_CREAT | O_APPEND | O_RDWR, 0777); if(hug_config.file_fd == -1) { fprintf(stderr, "Could not re-open logfile for writing: %s\n", |