Teach hushd to look in /usr/share/hush for params

This commit is contained in:
Duke Leto
2019-10-19 23:18:27 -04:00
parent 85f4ba694e
commit 0d4f96b512

View File

@@ -583,8 +583,7 @@ static CCriticalSection csPathCached;
static boost::filesystem::path ZC_GetBaseParamsDir()
{
// Copied from GetDefaultDataDir and adapter for zcash params.
// Copied from GetDefaultDataDir and adapted for zcash params.
namespace fs = boost::filesystem;
// Windows < Vista: C:\Documents and Settings\Username\Application Data\ZcashParams
// Windows >= Vista: C:\Users\Username\AppData\Roaming\ZcashParams
@@ -605,8 +604,13 @@ static boost::filesystem::path ZC_GetBaseParamsDir()
TryCreateDirectory(pathRet);
return pathRet / "ZcashParams";
#else
// Unix
return pathRet / ".zcash-params";
// Unixy systems. Debian packages install params system-wide
if (fs::exists("/usr/share/hush")) {
pathRet = fs::path("/usr/share/hush");
return pathRet;
} else {
return pathRet / ".zcash-params";
}
#endif
#endif
}