aboutsummaryrefslogtreecommitdiff
path: root/src/porting.cpp
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 18:29:48 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 18:29:48 +0200
commit84b85964fac715d03fef7094d2cdcd5945cb0dd2 (patch)
tree04f8e2873abc189aa9c372a0fce30e8b4a00ef47 /src/porting.cpp
parent69937c342cc420d352f6f7f5c6c90383312b76d4 (diff)
parentaf4b532c9e5cec84eb18ec52214636e69c653d87 (diff)
downloadminetest-84b85964fac715d03fef7094d2cdcd5945cb0dd2.tar.gz
minetest-84b85964fac715d03fef7094d2cdcd5945cb0dd2.tar.bz2
minetest-84b85964fac715d03fef7094d2cdcd5945cb0dd2.zip
Merge branch 'master' of github.com:erlehmann/minetest-delta
Diffstat (limited to 'src/porting.cpp')
-rw-r--r--src/porting.cpp6
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;