diff --git a/src/cache.cpp b/src/cache.cpp index 9ba955f..35bc659 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -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);