@@ -68,14 +68,16 @@ std::string opsqlite_get_db_path(std::string const &db_name,
6868 }
6969
7070 mkdir (location);
71- return location + " /" + db_name;
71+ char resolved_path[PATH_MAX];
72+ realpath ((location + " /" + db_name).c_str (), resolved_path);
73+ return std::string (resolved_path);
7274}
7375
7476#ifdef OP_SQLITE_USE_SQLCIPHER
7577sqlite3 *opsqlite_open (std::string const &name, std::string const &path,
76- std::string const &crsqlite_path,
77- std::string const &sqlite_vec_path,
78- std::string const &encryption_key) {
78+ std::string const &crsqlite_path,
79+ std::string const &sqlite_vec_path,
80+ std::string const &encryption_key) {
7981#else
8082sqlite3 *opsqlite_open (std::string const &name, std::string const &path,
8183 [[maybe_unused]] std::string const &crsqlite_path,
@@ -95,7 +97,7 @@ sqlite3 *opsqlite_open(std::string const &name, std::string const &path,
9597 }
9698
9799#ifdef OP_SQLITE_USE_SQLCIPHER
98- if (!encryption_key.empty ()) {
100+ if (!encryption_key.empty ()) {
99101 opsqlite_execute (db, " PRAGMA key = '" + encryption_key + " '" , nullptr );
100102 }
101103#endif
0 commit comments