mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-19 19:17:01 -07:00
Small patch to fix creating directory if it doesn't already exist
This commit is contained in:
parent
c28ee29250
commit
d4447a1ffa
1 changed files with 3 additions and 2 deletions
|
|
@ -15,9 +15,10 @@ namespace gdpm::cache{
|
|||
char *errmsg;
|
||||
|
||||
/* Check and make sure directory is created before attempting to open */
|
||||
if(!std::filesystem::exists(cache_path)){
|
||||
using namespace fs = std::filesystem;
|
||||
if(!fs::exists(fs::path(cache_path).parent_path())){
|
||||
log::info("Creating cache directories...{}", cache_path);
|
||||
std::filesystem::create_directories(cache_path);
|
||||
fs::create_directories(cache_path);
|
||||
}
|
||||
|
||||
int rc = sqlite3_open(cache_path.c_str(), &db);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue