summaryrefslogtreecommitdiff
path: root/src/porting.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-07-23 19:04:37 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-07-23 19:04:37 +0300
commit2587bb361cfc96b3a695d1476e39b9c0ecaa6553 (patch)
tree6e6a35e0ee35883201189df9c545cc44b7a06658 /src/porting.cpp
parent90d793f8f369bf1431d7a915198cd49b98bbe2d7 (diff)
parent976ec31c1faedc3a34935c3aafd6a868e222d1ad (diff)
downloadminetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.gz
minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.tar.bz2
minetest-2587bb361cfc96b3a695d1476e39b9c0ecaa6553.zip
merged the content type extension and 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;