aboutsummaryrefslogtreecommitdiff
path: root/src/leveldbwrapper.cpp
diff options
context:
space:
mode:
authorBrandon Dahler <[email protected]>2014-03-23 20:14:43 -0500
committerWladimir J. van der Laan <[email protected]>2014-03-31 09:51:58 +0200
commit2b7709dc84ed37128c125ca7a97b2e4b2c4437e7 (patch)
tree398d4f480d88291e7c3b73c193d31eb63cb9e6f4 /src/leveldbwrapper.cpp
parentMerge pull request #3987 from laanwj/2014_03_icreatemultisig (diff)
downloaddiscoin-2b7709dc84ed37128c125ca7a97b2e4b2c4437e7.tar.xz
discoin-2b7709dc84ed37128c125ca7a97b2e4b2c4437e7.zip
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 <[email protected]>
Diffstat (limited to 'src/leveldbwrapper.cpp')
-rw-r--r--src/leveldbwrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp
index 43c737a59..5b4a9c147 100644
--- a/src/leveldbwrapper.cpp
+++ b/src/leveldbwrapper.cpp
@@ -51,7 +51,7 @@ CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path &path, size_t nCa
LogPrintf("Wiping LevelDB in %s\n", path.string());
leveldb::DestroyDB(path.string(), options);
}
- boost::filesystem::create_directory(path);
+ TryCreateDirectory(path);
LogPrintf("Opening LevelDB in %s\n", path.string());
}
leveldb::Status status = leveldb::DB::Open(options, path.string(), &pdb);