diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-02-16 21:09:41 -0500 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-02-26 23:38:28 +0100 |
commit | 3f8cb2c565b24635d2967c9900cf5f2aa8b1d632 (patch) | |
tree | c29faa335bf501b123001ea80cf33e81c987ce11 /src/init.cpp | |
parent | 972060ce0e9746c979ce0ddeeb997121414c1d58 (diff) |
Reworked QT settings
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/init.cpp b/src/init.cpp index b701e90e91..a9d9eb71c2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -150,27 +150,15 @@ bool AppInit2(int argc, char* argv[]) // // Parameters // - // If Qt is used, parameters are parsed in qt/bitcoin.cpp's main() + // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main() #if !defined(QT_GUI) ParseParameters(argc, argv); -#endif - - if (mapArgs.count("-datadir")) + if (!ReadConfigFile(mapArgs, mapMultiArgs)) { - if (filesystem::is_directory(filesystem::system_complete(mapArgs["-datadir"]))) - { - filesystem::path pathDataDir = filesystem::system_complete(mapArgs["-datadir"]); - strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir)); - } - else - { - fprintf(stderr, "Error: Specified directory does not exist\n"); - Shutdown(NULL); - } + fprintf(stderr, "Error: Specified directory does not exist\n"); + Shutdown(NULL); } - - - ReadConfigFile(mapArgs, mapMultiArgs); // Must be done after processing datadir +#endif if (mapArgs.count("-?") || mapArgs.count("--help")) { |