From bccffa63a430a3e9f8dd6d557006f3e8ea15930a Mon Sep 17 00:00:00 2001 From: Emily Roberts Date: Sun, 1 Nov 2020 16:17:23 -0700 Subject: [PATCH] Add checking for config files in user home directory Check for configuration files in the home directory to make packaging XMRig for Linux easier. --- src/base/kernel/Base.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/base/kernel/Base.cpp b/src/base/kernel/Base.cpp index b20349e3..309e4c4d 100644 --- a/src/base/kernel/Base.cpp +++ b/src/base/kernel/Base.cpp @@ -136,6 +136,18 @@ private: if (read(chain, config)) { return config.release(); } + + chain.addFile(Process::location(Process::HomeLocation, ".xmrig.json")); + + if (read(chain, config)) { + return config.release(); + } + + chain.addFile(Process::location(Process::HomeLocation, ".config/xmrig.json")); + + if (read(chain, config)) { + return config.release(); + } # ifdef XMRIG_FEATURE_EMBEDDED_CONFIG chain.addRaw(default_config);