From 851894dceb0e69add81a87a97c8af6602dbe1f8e Mon Sep 17 00:00:00 2001 From: Saurabh Shrivastava Date: Mon, 6 Feb 2017 02:03:53 +0530 Subject: [PATCH] Fatal if unable to open output file. --- src/lib_ccx/ccx_encoders_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib_ccx/ccx_encoders_common.c b/src/lib_ccx/ccx_encoders_common.c index b853340a..680712cd 100644 --- a/src/lib_ccx/ccx_encoders_common.c +++ b/src/lib_ccx/ccx_encoders_common.c @@ -770,10 +770,10 @@ static int init_output_ctx(struct encoder_ctx *ctx, struct encoder_cfg *cfg) char *extension = NULL; // Input filename without the extension -#define check_ret(filename) if (ret != EXIT_OK) \ +#define check_ret(filename) if (ret != EXIT_OK) \ { \ - print_error(cfg->gui_mode_reports,"Failed %s\n", filename); \ - return ret; \ + fatal(CCX_COMMON_EXIT_FILE_CREATION_FAILED,"Failed to open output file: %s\nDetails : %s\n", filename, strerror(errno)); \ + return ret; \ } if (cfg->cc_to_stdout == CCX_FALSE && cfg->send_to_srv == CCX_FALSE && cfg->extract == 12)