X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fporting.cpp;h=92615d77a2b9a21a77313f8b412bbd0b821e9623;hb=81385682c8c1da90f2366452b10e20a93c0865fb;hp=0adc955a94f77b28861a5bd8b4c00e118feeab09;hpb=bfc68d31510bbd40732c19ada51d4683cb050de2;p=minetest.git diff --git a/src/porting.cpp b/src/porting.cpp index 0adc955a9..92615d77a 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "config.h" #include "debug.h" #include "filesys.h" +#include "log.h" #ifdef __APPLE__ #include "CoreFoundation/CoreFoundation.h" @@ -71,7 +72,6 @@ void sigint_handler(int sig) void signal_handler_init(void) { - dstream<<"signal_handler_init()"<" len = GetEnvironmentVariable("APPDATA", buf, buflen); assert(len < buflen); - path_userdata = std::string(buf) + DIR_DELIM + PROJECT_NAME; + path_user = std::string(buf) + DIR_DELIM + PROJECT_NAME; /* Linux @@ -251,15 +243,15 @@ void initializePaths() pathRemoveFile(buf, '/'); - path_data = std::string(buf) + "/../share/" + PROJECT_NAME; - //path_data = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME; - 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_share = std::string(buf) + "/../share/" + PROJECT_NAME; + //path_share = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME; + if (!fs::PathExists(path_share)) { + dstream<<"WARNING: system-wide share not found at \""<