From 9e42ddf72c2851c3a204dfa73583eb2c7236cfa8 Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Fri, 14 Jun 2019 10:10:12 -0500 Subject: [PATCH] Found a bug in IDBPolicy re creating a 'scratch space' dir. It wasn't checking for errors right, or creating the dir right. --- utils/idbdatafile/IDBPolicy.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/utils/idbdatafile/IDBPolicy.cpp b/utils/idbdatafile/IDBPolicy.cpp index 58b1d4601..e8240c481 100644 --- a/utils/idbdatafile/IDBPolicy.cpp +++ b/utils/idbdatafile/IDBPolicy.cpp @@ -83,8 +83,15 @@ void IDBPolicy::init( bool bEnableLogging, bool bUseRdwrMemBuffer, const string& else { cout << tmpfilepath << endl; - - if (!boost::filesystem::create_directory(tmpfilepath)) + bool itWorked = false; + + try + { + itWorked = boost::filesystem::create_directories(tmpfilepath); + } + catch (...) + { } + if (!itWorked) { // We failed to create the scratch directory ostringstream oss;