Teach hushd to look in /usr/share/hush for params
This commit is contained in:
12
src/util.cpp
12
src/util.cpp
@@ -583,8 +583,7 @@ static CCriticalSection csPathCached;
|
|||||||
|
|
||||||
static boost::filesystem::path ZC_GetBaseParamsDir()
|
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;
|
namespace fs = boost::filesystem;
|
||||||
// Windows < Vista: C:\Documents and Settings\Username\Application Data\ZcashParams
|
// Windows < Vista: C:\Documents and Settings\Username\Application Data\ZcashParams
|
||||||
// Windows >= Vista: C:\Users\Username\AppData\Roaming\ZcashParams
|
// Windows >= Vista: C:\Users\Username\AppData\Roaming\ZcashParams
|
||||||
@@ -605,8 +604,13 @@ static boost::filesystem::path ZC_GetBaseParamsDir()
|
|||||||
TryCreateDirectory(pathRet);
|
TryCreateDirectory(pathRet);
|
||||||
return pathRet / "ZcashParams";
|
return pathRet / "ZcashParams";
|
||||||
#else
|
#else
|
||||||
// Unix
|
// Unixy systems. Debian packages install params system-wide
|
||||||
return pathRet / ".zcash-params";
|
if (fs::exists("/usr/share/hush")) {
|
||||||
|
pathRet = fs::path("/usr/share/hush");
|
||||||
|
return pathRet;
|
||||||
|
} else {
|
||||||
|
return pathRet / ".zcash-params";
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user