diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-10 16:10:26 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-10 17:10:16 +0200 |
commit | 102070791808ba03f4a5836a9073b87029e72858 (patch) | |
tree | 8fbec1118aa8b61d45d492480194da6fdf8c2778 /src | |
parent | c89d1cf072f4ac34cfb35eadd8c9890b3de1b922 (diff) | |
download | minetest-102070791808ba03f4a5836a9073b87029e72858.tar.gz minetest-102070791808ba03f4a5836a9073b87029e72858.tar.bz2 minetest-102070791808ba03f4a5836a9073b87029e72858.zip |
Fix addon and configuration file paths
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 5 | ||||
-rw-r--r-- | src/server.cpp | 4 | ||||
-rw-r--r-- | src/servermain.cpp | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 322d84e9e..46fe4715d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1222,11 +1222,14 @@ int main(int argc, char *argv[]) core::array<std::string> filenames; filenames.push_back(porting::path_user + DIR_DELIM + "minetest.conf"); + // Legacy configuration file location + filenames.push_back(porting::path_user + + DIR_DELIM + ".." + DIR_DELIM + "minetest.conf"); #ifdef RUN_IN_PLACE // Try also from a lower level (to aid having the same configuration // for many RUN_IN_PLACE installs) filenames.push_back(porting::path_user + - DIR_DELIM + ".." + DIR_DELIM + "minetest.conf"); + DIR_DELIM + ".." + DIR_DELIM + ".." + DIR_DELIM + "minetest.conf"); #endif for(u32 i=0; i<filenames.size(); i++) diff --git a/src/server.cpp b/src/server.cpp index 69f655e6a..38cedd061 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -886,6 +886,10 @@ Server::Server( // Figure out some paths m_path_share = porting::path_share + DIR_DELIM + "server"; m_path_game = m_path_share + DIR_DELIM + "games" + DIR_DELIM + m_gamename; + m_path_addons.insert(m_path_share + DIR_DELIM + "addons" + + DIR_DELIM + m_gamename); + m_path_addons.insert(porting::path_user + DIR_DELIM + "server" + + DIR_DELIM + "addons" + DIR_DELIM + m_gamename); // Path to builtin.lua std::string builtinpath = m_path_share + DIR_DELIM + "builtin.lua"; diff --git a/src/servermain.cpp b/src/servermain.cpp index 5eb5162ae..9be0c80ae 100644 --- a/src/servermain.cpp +++ b/src/servermain.cpp @@ -284,11 +284,14 @@ int main(int argc, char *argv[]) core::array<std::string> filenames; filenames.push_back(porting::path_user + DIR_DELIM + "minetest.conf"); + // Legacy configuration file location + filenames.push_back(porting::path_user + + DIR_DELIM + ".." + DIR_DELIM + "minetest.conf"); #ifdef RUN_IN_PLACE // Try also from a lower level (to aid having the same configuration // for many RUN_IN_PLACE installs) filenames.push_back(porting::path_user + - DIR_DELIM + ".." + DIR_DELIM + "minetest.conf"); + DIR_DELIM + ".." + DIR_DELIM + ".." + DIR_DELIM + "minetest.conf"); #endif for(u32 i=0; i<filenames.size(); i++) |