From 4fe9bd1a72f69062c9783a0a065fbc516ae8f001 Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 4 May 2017 16:15:09 -0400 Subject: [PATCH] setup i2p only by default --- src/init.cpp | 4 ++++ src/util.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 5920cd3..d75c6f4 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -194,6 +194,10 @@ bool AppInit(int argc, char* argv[]) fprintf(stderr, "Error: Specified directory does not exist\n"); Shutdown(); } + if (!boost::filesystem::exists(GetConfigFile().string())) + { + writeFirstConfig(); // create default config + } ReadConfigFile(mapArgs, mapMultiArgs); if (mapArgs.count("-?") || mapArgs.count("--help")) diff --git a/src/util.cpp b/src/util.cpp index 68d2511..6c16493 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -995,7 +995,7 @@ bool writeConfig(boost::filesystem::path configFile, boost::property_tree::ptree return true; } -// Used by GUI wizard +// call upon first run bool writeFirstConfig() { using boost::property_tree::ptree;