aboutsummaryrefslogtreecommitdiff
path: root/src/common/Configuration/Config.cpp
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-04-18 20:29:42 +0200
committerNaios <naios-dev@live.de>2016-04-18 21:02:01 +0200
commit86b0fcf67aadc0d313253befb0590d00efd085bc (patch)
tree823ed6666acfff5599dfcca38f589dce275552f0 /src/common/Configuration/Config.cpp
parent081720b5dd5a80aa77181712d85d309d64d3ec03 (diff)
Core/Scripting: Use the path of the worldserver executable to search for the scripts dir
* Fixes issues when starting the worldserver not in the bin directory or the CMAKE_INSTALL_PREFIX directory using the -c option.
Diffstat (limited to 'src/common/Configuration/Config.cpp')
-rw-r--r--src/common/Configuration/Config.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/Configuration/Config.cpp b/src/common/Configuration/Config.cpp
index ddaab7dee61..888aa6ecef3 100644
--- a/src/common/Configuration/Config.cpp
+++ b/src/common/Configuration/Config.cpp
@@ -25,11 +25,13 @@
using namespace boost::property_tree;
-bool ConfigMgr::LoadInitial(std::string const& file, std::string& error)
+bool ConfigMgr::LoadInitial(std::string const& file, std::vector<std::string> args,
+ std::string& error)
{
std::lock_guard<std::mutex> lock(_configLock);
_filename = file;
+ _args = args;
try
{
@@ -65,7 +67,7 @@ ConfigMgr* ConfigMgr::instance()
bool ConfigMgr::Reload(std::string& error)
{
- return LoadInitial(_filename, error);
+ return LoadInitial(_filename, std::move(_args), error);
}
template<class T>