Browse Source

Create the catalog's parent dir before opening

default_compile_flags
vector-of-bool 5 years ago
parent
commit
c74b73cfcb
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/dds/catalog/catalog.cpp

+ 3
- 0
src/dds/catalog/catalog.cpp View File

} // namespace } // namespace


catalog catalog::open(const std::string& db_path) { catalog catalog::open(const std::string& db_path) {
if (db_path != ":memory:") {
fs::create_directories(fs::weakly_canonical(db_path).parent_path());
}
auto db = sqlite3::database::open(db_path); auto db = sqlite3::database::open(db_path);
try { try {
ensure_migrated(db); ensure_migrated(db);

Loading…
Cancel
Save