diff options
author | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-20 18:29:48 +0200 |
---|---|---|
committer | Nils Dagsson Moskopp <nils@dieweltistgarnichtso.net> | 2011-07-20 18:29:48 +0200 |
commit | 33e80dae7f48eac99d5c692d7429e37b11666c96 (patch) | |
tree | d6a738abe0adca833b6342bc58731dbe0037cad4 /src/porting.cpp | |
parent | e5dc58e7103d46298bbca66b0a6a7d9d61146e7e (diff) | |
parent | 4f53619a15cd5a1cd18e8e3eb7c5eb21608b460e (diff) | |
download | dragonfireclient-33e80dae7f48eac99d5c692d7429e37b11666c96.tar.xz |
Merge branch 'master' of github.com:erlehmann/minetest-delta
Diffstat (limited to 'src/porting.cpp')
-rw-r--r-- | src/porting.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/porting.cpp b/src/porting.cpp index 7de042ab5..ff8cb3862 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "porting.h" #include "config.h" #include "debug.h" +#include "filesys.h" #ifdef __APPLE__ #include "CoreFoundation/CoreFoundation.h" @@ -210,6 +211,11 @@ void initializePaths() path_data = std::string(buf) + "/../share/" + APPNAME; //path_data = std::string(INSTALL_PREFIX) + "/share/" + APPNAME; + if (!fs::PathExists(path_data)) { + dstream<<"WARNING: data path " << path_data << " not found!"; + path_data = std::string(buf) + "/../data"; + dstream<<" Trying " << path_data << std::endl; + } path_userdata = std::string(getenv("HOME")) + "/." + APPNAME; |