From 8949e757f06d40a37b11fc1518f02e2b72276849 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Marchal?= Date: Tue, 25 Jan 2011 21:08:09 +0000 Subject: [PATCH] Don't try to produce a parsed log if parsed_output_log is none The correct value to set in parsed_output_log to disable the parsed log is "no" but if the user enters "none" as is usual with the other parameters, parsed_output_log is set to an empty string which is not equivalent to "no". The creation of the parsed log would then proceed and fail because the path is invalid. --- log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log.c b/log.c index b3e2b6c..35734dd 100644 --- a/log.c +++ b/log.c @@ -260,7 +260,7 @@ int main(int argc,char *argv[]) strcpy(IndexSortOrder,"D"); ShowSargInfo=true; ShowSargLogo=true; - strcpy(ParsedOutputLog,"no"); + ParsedOutputLog[0]='\0'; strcpy(ParsedOutputLogCompress,"/bin/gzip -f"); DisplayedValues=DISPLAY_ABBREV; strcpy(HeaderFontSize,"9px"); @@ -867,7 +867,7 @@ int main(int argc,char *argv[]) } } - if(!fp_log && strcmp(ParsedOutputLog, "no") != 0 && ilf!=ILF_Sarg) { + if(!fp_log && ParsedOutputLog[0] && ilf!=ILF_Sarg) { if(access(ParsedOutputLog,R_OK) != 0) { my_mkdir(ParsedOutputLog); } -- 2.47.3