From a0be116b6604fb50f4e5bf4204eccf8329fe29c9 Mon Sep 17 00:00:00 2001 From: "David J. Allen" Date: Sat, 30 Jul 2022 13:05:11 -0500 Subject: [PATCH] Patch to fix where the path used for `create_directories()` in `create_package_database` --- src/cache.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cache.cpp b/src/cache.cpp index 35bc659..ea75032 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -15,10 +15,11 @@ namespace gdpm::cache{ char *errmsg; /* Check and make sure directory is created before attempting to open */ - using namespace fs = std::filesystem; - if(!fs::exists(fs::path(cache_path).parent_path())){ + namespace fs = std::filesystem; + fs::path dir_path = fs::path(cache_path).parent.path(); + if(!fs::exists(dir_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);