Patch to fix where the path used for create_directories() in create_package_database

This commit is contained in:
David Allen 2022-07-30 13:05:11 -05:00
parent 375d91480d
commit a0be116b66

View file

@ -15,10 +15,11 @@ namespace gdpm::cache{
char *errmsg; char *errmsg;
/* Check and make sure directory is created before attempting to open */ /* Check and make sure directory is created before attempting to open */
using namespace fs = std::filesystem; namespace fs = std::filesystem;
if(!fs::exists(fs::path(cache_path).parent_path())){ fs::path dir_path = fs::path(cache_path).parent.path();
if(!fs::exists(dir_path){
log::info("Creating cache directories...{}", cache_path); log::info("Creating cache directories...{}", cache_path);
fs::create_directories(cache_path); fs::create_directories(dir_path);
} }
int rc = sqlite3_open(cache_path.c_str(), &db); int rc = sqlite3_open(cache_path.c_str(), &db);