summaryrefslogtreecommitdiff
path: root/server/server/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/server/config.cpp')
-rw-r--r--server/server/config.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/server/config.cpp b/server/server/config.cpp
index 3ee15a8..d4602da 100644
--- a/server/server/config.cpp
+++ b/server/server/config.cpp
@@ -4,7 +4,11 @@ config::config(const char *pth)
{
std::ifstream config;
if(!pth)
- config.open("./server.cfg", std::fstream::in);
+ {
+ std::string cfg_path = boost::filesystem::initial_path().string();
+ cfg_path += "/server.cfg";
+ config.open(cfg_path.c_str(), std::fstream::in);
+ }
else
config.open(pth, std::fstream::in);
std::string cfg_str((std::istreambuf_iterator<char>(config)), std::istreambuf_iterator<char>());