aboutsummaryrefslogtreecommitdiff
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
commitaf4b532c9e5cec84eb18ec52214636e69c653d87 (patch)
tree630192d43d6a1a91d0ea1e2ef207dd281c8b045f /src/porting.cpp
parent489a7ef3247f1db1f44efa2c7fbafb70c00f7812 (diff)
parent52df1b598c253eda7b9e33cf9b7e97d16c7dc138 (diff)
downloadminetest-af4b532c9e5cec84eb18ec52214636e69c653d87.tar.gz
minetest-af4b532c9e5cec84eb18ec52214636e69c653d87.tar.bz2
minetest-af4b532c9e5cec84eb18ec52214636e69c653d87.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;