From 0d4f96b5123a8c4ba6949ebdebacc3d892e1d680 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 19 Oct 2019 23:18:27 -0400 Subject: [PATCH] Teach hushd to look in /usr/share/hush for params --- src/util.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index 7fd4d87c6..b6e868489 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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 }