Fix database path for Windows

This commit is contained in:
Max Isom 2022-01-09 18:50:30 -06:00
parent c3231defb8
commit 21c9dee6f8
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
2 changed files with 6 additions and 1 deletions

View file

@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- The SQLite database path is now correctly generated on Windows
### Changed
- Track lookups no longer fail silently (error is returned and logged)

View file

@ -1,4 +1,6 @@
export const createDatabasePath = (directory: string) => `${directory}/db.sqlite`;
import {join} from 'path';
export const createDatabasePath = (directory: string) => join(directory, 'db.sqlite');
const createDatabaseUrl = (directory: string) => `file:${createDatabasePath(directory)}`;