Browse Source

test

pull/4/head
jl777 8 years ago
parent
commit
892dc7ac84
  1. 18
      src/util.cpp

18
src/util.cpp

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

Loading…
Cancel
Save