diff --git a/include/cache.hpp b/include/cache.hpp index 6d54a8c..74855ae 100644 --- a/include/cache.hpp +++ b/include/cache.hpp @@ -17,7 +17,7 @@ namespace gdpm::cache{ std::vector get_installed_packages(const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int update_package_info(const std::vector& packages, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int update_sync_info(const std::vector& download_urls, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); - int delete_packages(const std::vector& package_titles, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_TABLENAME); + int delete_packages(const std::vector& package_titles, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int delete_packages(const std::vector& package_ids, const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); int drop_package_database(const std::string& cache_path = GDPM_PACKAGE_CACHE_PATH, const std::string& table_name = GDPM_PACKAGE_CACHE_TABLENAME); diff --git a/src/cache.cpp b/src/cache.cpp index 2b17b7a..9ba955f 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -320,7 +320,7 @@ namespace gdpm::cache{ char *errmsg = nullptr; std::string sql; - int rc = sqlite3_open(cache_path, &db); + int rc = sqlite3_open(cache_path.c_str(), &db); if(rc != SQLITE_OK){ log::error("delete_packages.sqlite3_open(): {}", sqlite3_errmsg(db)); sqlite3_close(db);