summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_options.cpp
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2013-10-17 14:26:06 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2013-10-24 11:00:24 -0400
commit50ec2a895783239dde6ed0d51ffa9d522e2bebf2 (patch)
tree27a1f0952b578d06a99973eba784fb7600a07713 /src/mongo/db/server_options.cpp
parent7023936764956d0e7c2383d89b4203fad2741596 (diff)
downloadmongo-50ec2a895783239dde6ed0d51ffa9d522e2bebf2.tar.gz
SERVER-11226 fix --keyFile to work with relative path when --fork'd
Diffstat (limited to 'src/mongo/db/server_options.cpp')
-rw-r--r--src/mongo/db/server_options.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/server_options.cpp b/src/mongo/db/server_options.cpp
index 9786ebef31b..75def3d8ce8 100644
--- a/src/mongo/db/server_options.cpp
+++ b/src/mongo/db/server_options.cpp
@@ -34,6 +34,7 @@
#define SYSLOG_NAMES
#include <syslog.h>
#endif
+#include <boost/filesystem.hpp>
#include "mongo/base/status.h"
#include "mongo/bson/util/builder.h"
@@ -505,7 +506,8 @@ namespace {
}
if (params.count("keyFile")) {
- serverGlobalParams.keyFile = params["keyFile"].as<string>();
+ serverGlobalParams.keyFile = boost::filesystem::absolute(
+ params["keyFile"].as<string>()).generic_string();
}
if ( params.count("pidfilepath")) {