aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Isom <[email protected]>2022-01-09 18:50:30 -0600
committerMax Isom <[email protected]>2022-01-09 18:52:05 -0600
commit21c9dee6f856edf20d4f33f49f3f20d815be92d1 (patch)
tree1e7b629ab19d88fd5bf932c21bdda399ab4a6cc1
parentc3231defb880b04ca3919dd333287fbdb843e43d (diff)
downloadmuse-21c9dee6f856edf20d4f33f49f3f20d815be92d1.tar.xz
muse-21c9dee6f856edf20d4f33f49f3f20d815be92d1.zip
Fix database path for Windows
-rw-r--r--CHANGELOG.md3
-rw-r--r--src/utils/create-database-url.ts4
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5af4bb2..e216935 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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)
diff --git a/src/utils/create-database-url.ts b/src/utils/create-database-url.ts
index cab398e..becc973 100644
--- a/src/utils/create-database-url.ts
+++ b/src/utils/create-database-url.ts
@@ -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)}`;