@op-engineering/op-sqlite 11.2.13 → 11.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cpp/bindings.cpp +1 -1
- package/cpp/bridge.cpp +6 -5
- package/cpp/libsql/bridge.cpp +6 -6
- package/ios/sqlitevec.xcframework/ios-arm64/sqlitevec.framework/Info.plist +2 -2
- package/ios/sqlitevec.xcframework/ios-arm64_x86_64-simulator/sqlitevec.framework/Info.plist +2 -2
- package/package.json +1 -1
package/cpp/bindings.cpp
CHANGED
package/cpp/bridge.cpp
CHANGED
|
@@ -67,14 +67,15 @@ std::string opsqlite_get_db_path(std::string const &db_name,
|
|
|
67
67
|
if (location == ":memory:") {
|
|
68
68
|
return location;
|
|
69
69
|
}
|
|
70
|
-
char resolved_location[PATH_MAX];
|
|
71
|
-
realpath(location.c_str(), resolved_location);
|
|
72
|
-
std::string resolved_location_string = std::string(resolved_location);
|
|
73
70
|
|
|
74
71
|
// Will return false if the directory already exists, no need to check
|
|
75
|
-
std::filesystem::create_directories(
|
|
72
|
+
std::filesystem::create_directories(location);
|
|
76
73
|
|
|
77
|
-
|
|
74
|
+
if (!location.empty() && location.back() != '/') {
|
|
75
|
+
return location + "/" + db_name;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return location + db_name;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
#ifdef OP_SQLITE_USE_SQLCIPHER
|
package/cpp/libsql/bridge.cpp
CHANGED
|
@@ -26,14 +26,14 @@ std::string opsqlite_get_db_path(std::string const &db_name,
|
|
|
26
26
|
return location;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
char resolved_location[PATH_MAX];
|
|
30
|
-
realpath(location.c_str(), resolved_location);
|
|
31
|
-
std::string resolved_location_string = std::string(resolved_location);
|
|
32
|
-
|
|
33
29
|
// Will return false if the directory already exists, no need to check
|
|
34
|
-
std::filesystem::create_directories(
|
|
30
|
+
std::filesystem::create_directories(location);
|
|
31
|
+
|
|
32
|
+
if (!location.empty() && location.back() != '/') {
|
|
33
|
+
return location + "/" + db_name;
|
|
34
|
+
}
|
|
35
35
|
|
|
36
|
-
return
|
|
36
|
+
return location + db_name;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
DB opsqlite_libsql_open_sync(std::string const &name,
|