mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 11:37:00 -07:00
Patch to fix where the path used for create_directories() in create_package_database
This commit is contained in:
parent
375d91480d
commit
a0be116b66
1 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue