Browse Source

changed data path back to AppData/Roaming

pull/340/head
orignal 9 years ago
parent
commit
03587d7035
  1. 8
      util.cpp

8
util.cpp

@ -215,15 +215,15 @@ namespace filesystem
boost::filesystem::path GetDefaultDataDir() boost::filesystem::path GetDefaultDataDir()
{ {
// Windows < Vista: C:\Documents and Settings\Username\.i2pd // Windows < Vista: C:\Documents and Settings\Username\Application Data\i2pd
// Windows >= Vista: C:\Users\Username\.i2pd // Windows >= Vista: C:\Users\Username\AppData\Roaming\i2pd
// Mac: ~/Library/Application Support/i2pd // Mac: ~/Library/Application Support/i2pd
// Unix: ~/.i2pd or /var/lib/i2pd is system=1 // Unix: ~/.i2pd or /var/lib/i2pd is system=1
#ifdef WIN32 #ifdef WIN32
// Windows // Windows
char localAppData[MAX_PATH]; char localAppData[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_PROFILE, 0, 0, localAppData); SHGetFolderPath(NULL, CSIDL_APPDATA, 0, NULL, localAppData);
return boost::filesystem::path(std::string(localAppData) + "\\" + "." + appName); return boost::filesystem::path(std::string(localAppData) + "\\" + appName);
#else /* UNIX */ #else /* UNIX */
if (i2p::util::config::GetArg("-service", 0)) // use system folder if (i2p::util::config::GetArg("-service", 0)) // use system folder
return boost::filesystem::path(std::string ("/var/lib/") + appName); return boost::filesystem::path(std::string ("/var/lib/") + appName);

Loading…
Cancel
Save