Skip to content

Commit

Permalink
fix(sqlite): remove extra / from database filename in windows
Browse files Browse the repository at this point in the history
resolves #2897
  • Loading branch information
farnabaz committed Jan 6, 2025
1 parent f493ece commit 8a9af69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/adapters/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default createDatabaseAdapter<{ filename: string }>((opts) => {
const filename = !opts || isAbsolute(opts?.filename || '')
? opts?.filename
: new URL(opts.filename, (globalThis as unknown as { _importMeta_: { url: string } })._importMeta_.url).pathname
db = new Database(filename)
db = new Database(process.platform === 'win32' ? filename.slice(1) : filename)
}

return {
Expand Down

0 comments on commit 8a9af69

Please sign in to comment.