Wrap create_directory calls in try...catch blocks.

Ignores any exceptions thrown if directory exists, otherwise re-throws exception.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
This commit is contained in:
Brandon Dahler
2014-03-23 20:14:43 -05:00
committed by Wladimir J. van der Laan
parent 5a2ed60a04
commit 2b7709dc84
5 changed files with 22 additions and 4 deletions

View File

@@ -178,7 +178,7 @@ void Intro::pickDataDirectory()
}
dataDir = intro.getDataDirectory();
try {
fs::create_directory(GUIUtil::qstringToBoostPath(dataDir));
TryCreateDirectory(GUIUtil::qstringToBoostPath(dataDir));
break;
} catch(fs::filesystem_error &e) {
QMessageBox::critical(0, tr("Bitcoin"),