Merge branch 'openssl' into new-cmdline

This commit is contained in:
hagen 2016-01-26 08:03:18 +00:00
commit 3817a0c2a1
16 changed files with 111 additions and 35 deletions

View file

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