Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/workerd/util/sqlite.c++
Original file line number Diff line number Diff line change
Expand Up @@ -508,16 +508,17 @@ void SqliteDatabase::init(kj::Maybe<kj::WriteMode> maybeMode) {
KJ_IF_SOME(rootedPath, vfs.tryAppend(path)) {
// If we can get the path rooted in the VFS's directory, use the system's default VFS instead
// TODO(bug): This doesn't honor vfs.options. (This branch is only used on Windows.)
SQLITE_CALL_NODB(sqlite3_open_v2(rootedPath.toString().cStr(), &db, flags, nullptr));
SQLITE_CALL_NODB(
sqlite3_open_v2(rootedPath.toNativeString(true).cStr(), &db, flags, nullptr));
} else {
SQLITE_CALL_NODB(sqlite3_open_v2(path.toString().cStr(), &db, flags, vfs.getName().cStr()));
}
} else {
KJ_IF_SOME(rootedPath, vfs.tryAppend(path)) {
// If we can get the path rooted in the VFS's directory, use the system's default VFS instead
// TODO(bug): This doesn't honor vfs.options. (This branch is only used on Windows.)
SQLITE_CALL_NODB(
sqlite3_open_v2(rootedPath.toString().cStr(), &db, SQLITE_OPEN_READONLY, nullptr));
SQLITE_CALL_NODB(sqlite3_open_v2(
rootedPath.toNativeString(true).cStr(), &db, SQLITE_OPEN_READONLY, nullptr));
} else {
SQLITE_CALL_NODB(
sqlite3_open_v2(path.toString().cStr(), &db, SQLITE_OPEN_READONLY, vfs.getName().cStr()));
Expand Down
Loading