aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 6625ac9325..cef3e97c28 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -379,6 +379,11 @@ void ParseParameters(int argc, const char* const argv[])
}
}
+bool IsArgSet(const std::string& strArg)
+{
+ return mapArgs.count(strArg);
+}
+
std::string GetArg(const std::string& strArg, const std::string& strDefault)
{
if (mapArgs.count(strArg))
@@ -498,7 +503,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
if (!path.empty())
return path;
- if (mapArgs.count("-datadir")) {
+ if (IsArgSet("-datadir")) {
path = fs::system_complete(mapArgs["-datadir"]);
if (!fs::is_directory(path)) {
path = "";