From 92d3ce1a0a6af85a2f833f4838f539f4f3bd90b8 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Fri, 29 Aug 2014 15:40:54 +0900 Subject: [PATCH] Resolve relative path --- bin/droonga-http-server | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/droonga-http-server b/bin/droonga-http-server index 37316fb..b9c2a7f 100755 --- a/bin/droonga-http-server +++ b/bin/droonga-http-server @@ -126,7 +126,8 @@ if (options.daemon) { } var logger; -if (options.systemLogFile) { +if (options.systemLogFile && options.systemLogFile != '-') { + options.systemLogFile = path.resolve(baseDir, options.systemLogFile); logger = new winston.Logger({ transports: [ new winston.transports.File({ @@ -146,6 +147,7 @@ if (options.systemLogFile) { } if (options.pidFile) { + options.pidFile = path.resolve(baseDir, options.pidFile); var fd = fs.openSync(options.pidFile, 'w', 0644); fs.writeSync(fd, process.pid.toString()); } @@ -174,6 +176,7 @@ if (options.accessLogFile) { flags: 'a', mode: 0644 }; + options.accessLogFile = path.resolve(baseDir, options.accessLogFile); accessLogStream = fs.createWriteStream(options.accessLogFile, accessLogStreamOptions); }