Hoisted path var in ZC_GetBaseParamsDir
This commit is contained in:
@@ -554,17 +554,17 @@ static boost::filesystem::path ZC_GetBaseParamsDir()
|
|||||||
// Windows >= Vista: C:\Users\Username\AppData\Roaming\ZcashParams
|
// Windows >= Vista: C:\Users\Username\AppData\Roaming\ZcashParams
|
||||||
// Mac: ~/Library/Application Support/ZcashParams
|
// Mac: ~/Library/Application Support/ZcashParams
|
||||||
// Unix: ~/.zcash-params
|
// Unix: ~/.zcash-params
|
||||||
|
fs::path pathRet;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Windows
|
// Windows
|
||||||
if (mapArgs.count("-zcashparamsdir")) {
|
if (mapArgs.count("-zcashparamsdir")) {
|
||||||
path = fs::system_complete(mapArgs["-zcashparamsdir"]);
|
pathRet = fs::system_complete(mapArgs["-zcashparamsdir"]);
|
||||||
if (fs::is_directory(path)) {
|
if (fs::is_directory(pathRet)) {
|
||||||
return path;
|
return pathRet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return GetSpecialFolderPath(CSIDL_APPDATA) / "ZcashParams";
|
return GetSpecialFolderPath(CSIDL_APPDATA) / "ZcashParams";
|
||||||
#else
|
#else
|
||||||
fs::path pathRet;
|
|
||||||
char* pszHome = getenv("HOME");
|
char* pszHome = getenv("HOME");
|
||||||
if (pszHome == NULL || strlen(pszHome) == 0)
|
if (pszHome == NULL || strlen(pszHome) == 0)
|
||||||
pathRet = fs::path("/");
|
pathRet = fs::path("/");
|
||||||
|
|||||||
Reference in New Issue
Block a user