mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
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:
parent
5a2ed60a04
commit
2b7709dc84
5 changed files with 22 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
|
|||
|
||||
path = pathIn;
|
||||
filesystem::path pathLogDir = path / "database";
|
||||
filesystem::create_directory(pathLogDir);
|
||||
TryCreateDirectory(pathLogDir);
|
||||
filesystem::path pathErrorFile = path / "db.log";
|
||||
LogPrintf("dbenv.open LogDir=%s ErrorFile=%s\n", pathLogDir.string(), pathErrorFile.string());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue