|
@ -402,6 +402,7 @@ void PrintExceptionContinue(const std::exception* pex, const char* pszThread) |
|
|
|
|
|
|
|
|
boost::filesystem::path GetDefaultDataDir() |
|
|
boost::filesystem::path GetDefaultDataDir() |
|
|
{ |
|
|
{ |
|
|
|
|
|
extern char ASSETCHAINS_SYMBOL[16]; |
|
|
namespace fs = boost::filesystem; |
|
|
namespace fs = boost::filesystem; |
|
|
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Zcash
|
|
|
// Windows < Vista: C:\Documents and Settings\Username\Application Data\Zcash
|
|
|
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Zcash
|
|
|
// Windows >= Vista: C:\Users\Username\AppData\Roaming\Zcash
|
|
@ -409,7 +410,9 @@ boost::filesystem::path GetDefaultDataDir() |
|
|
// Unix: ~/.zcash
|
|
|
// Unix: ~/.zcash
|
|
|
#ifdef WIN32 |
|
|
#ifdef WIN32 |
|
|
// Windows
|
|
|
// Windows
|
|
|
return GetSpecialFolderPath(CSIDL_APPDATA) / "Komodo"; |
|
|
if ( ASSETCHAINS_SYMBOL[0] == 0 ) |
|
|
|
|
|
return GetSpecialFolderPath(CSIDL_APPDATA) / "Komodo"; |
|
|
|
|
|
else return GetSpecialFolderPath(CSIDL_APPDATA) / "Komodo" / ASSETCHAINS_SYMBOL; |
|
|
#else |
|
|
#else |
|
|
fs::path pathRet; |
|
|
fs::path pathRet; |
|
|
char* pszHome = getenv("HOME"); |
|
|
char* pszHome = getenv("HOME"); |
|
@ -421,10 +424,19 @@ boost::filesystem::path GetDefaultDataDir() |
|
|
// Mac
|
|
|
// Mac
|
|
|
pathRet /= "Library/Application Support"; |
|
|
pathRet /= "Library/Application Support"; |
|
|
TryCreateDirectory(pathRet); |
|
|
TryCreateDirectory(pathRet); |
|
|
return pathRet / "Komodo"; |
|
|
if ( ASSETCHAINS_SYMBOL[0] == 0 ) |
|
|
|
|
|
return pathRet / "Komodo"; |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
pathRet /= "Komodo"; |
|
|
|
|
|
TryCreateDirectory(pathRet); |
|
|
|
|
|
return pathRet / ASSETCHAINS_SYMBOL; |
|
|
|
|
|
} |
|
|
#else |
|
|
#else |
|
|
// Unix
|
|
|
// Unix
|
|
|
return pathRet / ".komodo"; |
|
|
if ( ASSETCHAINS_SYMBOL[0] == 0 ) |
|
|
|
|
|
return pathRet / ".komodo"; |
|
|
|
|
|
else return pathRet / ".komodo" / ASSETCHAINS_SYMBOL; |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|