From: Frédéric Marchal Date: Tue, 25 Jan 2011 21:07:40 +0000 (+0000) Subject: Don't write at root of filesystem if no output directory is provided X-Git-Tag: v2.3.2~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=842e80ddcbf6610e8d8fced2891b957a3fe51273;p=thirdparty%2Fsarg.git Don't write at root of filesystem if no output directory is provided The empty output_dir is accepted but it produces an error as the output directory must be absolute. That restriction might be aleviated in the future. --- diff --git a/log.c b/log.c index 9b99a1c..b3e2b6c 100644 --- a/log.c +++ b/log.c @@ -607,7 +607,7 @@ int main(int argc,char *argv[]) if(MaxElapsed[0] != '\0') max_elapsed=atol(MaxElapsed); if(outdir[0] == '\0') strcpy(outdir,OutputDir); - strcat(outdir,"/"); + if(outdir[0] != '\0') strcat(outdir,"/"); if(uagent[0] == '\0') strcpy(uagent,UserAgentLog);