From 892dc7ac844aec56d53fd98b5879e3084ae87f9e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 29 Oct 2016 10:21:22 -0300 Subject: [PATCH] test --- src/util.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 98f8c1720..ccf41b4e9 100644 --- a/src/util.cpp +++ b/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 }