When datadir missing, show messagebox instead of printing error to stderr
This commit is contained in:
parent
0547b02af7
commit
61fd72695f
1 changed files with 4 additions and 1 deletions
|
@ -132,7 +132,10 @@ int main(int argc, char *argv[])
|
||||||
// ... then bitcoin.conf:
|
// ... then bitcoin.conf:
|
||||||
if (!boost::filesystem::is_directory(GetDataDir(false)))
|
if (!boost::filesystem::is_directory(GetDataDir(false)))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Error: Specified directory does not exist\n");
|
// This message can not be translated, as translation is not initialized yet
|
||||||
|
// (which not yet possible because lang=XX can be overridden in bitcoin.conf in the data directory)
|
||||||
|
QMessageBox::critical(0, "Bitcoin",
|
||||||
|
QString("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
ReadConfigFile(mapArgs, mapMultiArgs);
|
ReadConfigFile(mapArgs, mapMultiArgs);
|
||||||
|
|
Loading…
Reference in a new issue