Skip to content
Commit Detail

Commit 273e1d7

Author
Somhairle MacLeòid <smacleod@cloudflare.com> 2026-02-27 15:16:59 +0000
Parents
8c6300e
Tree
f92b1b3
Fix Windows SQLITE_CANTOPEN by using native path format (#6110)

On Windows, SqliteDatabase::init() constructs the database path via
tryAppend() which returns a kj::Path. The path was serialized with
toString() which produces Unix-style forward-slash paths (e.g.
D:/a/_temp/.../actor.sqlite). This path is passed to sqlite3_open_v2()
with nullptr VFS, meaning SQLite uses the default win32 VFS which
expects native Windows paths.

Switch to toNativeString(true) which produces proper Windows paths
with backslashes (D:\a\_temp\...\actor.sqlite). On non-Windows
platforms, toNativeString() is equivalent to toString(), so this
change is a no-op there. The tryAppend() codepath is also
Windows-only (returns kj::none on other platforms), so the change
is fully scoped.

This fixes SQLITE_CANTOPEN errors when using SQLite-backed Durable
Objects with Miniflare on Windows.

Files changed

1 file changed~1 modified