Skip to content

Commit bb1f36d

Browse files
aw-datastore: Fix broken legacy import on Windows
Since the "author" field was not passed to appdirs, the old aw-server folder was not correctly set for the old aw-server database and therefore skipped.
1 parent ef55603 commit bb1f36d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

aw-datastore/src/legacy_import.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod import {
3434
use super::LegacyDatastoreImportError;
3535

3636
fn dbfile_path() -> PathBuf {
37-
let mut dir = appdirs::user_data_dir(Some("activitywatch"), None, false).unwrap();
37+
let mut dir = appdirs::user_data_dir(Some("activitywatch"), Some("activitywatch"), false).unwrap();
3838
dir.push("aw-server");
3939
dir.push("peewee-sqlite.v2.db");
4040
dir
@@ -157,6 +157,7 @@ mod import {
157157
) -> Result<(), LegacyDatastoreImportError> {
158158
let legacy_db_path = dbfile_path();
159159
if !legacy_db_path.exists() {
160+
info!("Did not find an old database, skipping legacy import");
160161
return Ok(());
161162
}
162163
info!("Importing legacy DB");

0 commit comments

Comments
 (0)