summaryrefslogtreecommitdiff
path: root/src/porting.cpp
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 09:29:07 -0700
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-20 09:29:07 -0700
commit4f53619a15cd5a1cd18e8e3eb7c5eb21608b460e (patch)
treeeb808152554a60731867f4c42c5ffbd9d428d185 /src/porting.cpp
parentcef7bb06195f3923f5c47547b48fe6e6e51c932d (diff)
parent3fb5b7a3bd95eb6327c6894072739a7c28c711ce (diff)
downloadminetest-4f53619a15cd5a1cd18e8e3eb7c5eb21608b460e.tar.gz
minetest-4f53619a15cd5a1cd18e8e3eb7c5eb21608b460e.tar.bz2
minetest-4f53619a15cd5a1cd18e8e3eb7c5eb21608b460e.zip
Merge pull request #23 from Oblomov/master
Some misc usability patches
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;