|
|
|
|
|
|
|
|
#include <dds/error/errors.hpp> |
|
|
#include <dds/error/errors.hpp> |
|
|
#include <dds/solve/solve.hpp> |
|
|
#include <dds/solve/solve.hpp> |
|
|
#include <dds/util/log.hpp> |
|
|
#include <dds/util/log.hpp> |
|
|
|
|
|
#include <dds/util/paths.hpp> |
|
|
|
|
|
|
|
|
#include <json5/parse_data.hpp> |
|
|
#include <json5/parse_data.hpp> |
|
|
#include <neo/assert.hpp> |
|
|
#include <neo/assert.hpp> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace |
|
|
} // namespace |
|
|
|
|
|
|
|
|
|
|
|
fs::path catalog::default_path() noexcept { return dds_data_dir() / "catalog.db"; } |
|
|
|
|
|
|
|
|
catalog catalog::open(const std::string& db_path) { |
|
|
catalog catalog::open(const std::string& db_path) { |
|
|
if (db_path != ":memory:") { |
|
|
if (db_path != ":memory:") { |
|
|
auto pardir = fs::weakly_canonical(db_path).parent_path(); |
|
|
auto pardir = fs::weakly_canonical(db_path).parent_path(); |