|
|
|
@ -141,10 +141,19 @@ bool AppInit2(int argc, char* argv[])
@@ -141,10 +141,19 @@ bool AppInit2(int argc, char* argv[])
|
|
|
|
|
|
|
|
|
|
if (mapArgs.count("-datadir")) |
|
|
|
|
{ |
|
|
|
|
filesystem::path pathDataDir = filesystem::system_complete(mapArgs["-datadir"]); |
|
|
|
|
strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir)); |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ReadConfigFile(mapArgs, mapMultiArgs); // Must be done after processing datadir
|
|
|
|
|
|
|
|
|
|
if (mapArgs.count("-?") || mapArgs.count("--help")) |
|
|
|
|