Browse Source

Fix operating system detection in util.cpp.

pull/271/head
EinMByte 9 years ago
parent
commit
d3cede7995
  1. 4
      core/util/util.cpp

4
core/util/util.cpp

@ -208,7 +208,7 @@ namespace filesystem
#ifdef I2PD_CUSTOM_DATA_PATH #ifdef I2PD_CUSTOM_DATA_PATH
return boost::filesystem::path(std::string(I2PD_CUSTOM_DATA_PATH)); return boost::filesystem::path(std::string(I2PD_CUSTOM_DATA_PATH));
#else #else
#ifdef WIN32 #ifdef _WIN32
// Windows // Windows
char localAppData[MAX_PATH]; char localAppData[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_APPDATA, 0, NULL, localAppData); SHGetFolderPath(NULL, CSIDL_APPDATA, 0, NULL, localAppData);
@ -220,7 +220,7 @@ namespace filesystem
pathRet = boost::filesystem::path("/"); pathRet = boost::filesystem::path("/");
else else
pathRet = boost::filesystem::path(pszHome); pathRet = boost::filesystem::path(pszHome);
#ifdef MAC_OSX #ifdef __APPLE__
// Mac // Mac
pathRet /= "Library/Application Support"; pathRet /= "Library/Application Support";
boost::filesystem::create_directory(pathRet); boost::filesystem::create_directory(pathRet);

Loading…
Cancel
Save