Browse Source

Hoisted path var in ZC_GetBaseParamsDir

pull/4/head
miketout 6 years ago
parent
commit
9532e6b7c9
  1. 8
      src/util.cpp

8
src/util.cpp

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

Loading…
Cancel
Save