Skip to content


aw-datastore: Fix broken legacy import on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
johan-bjareholt committed Mar 15, 2021
1 parent ef55603 commit bb1f36d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aw-datastore/src/
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod import {
use super::LegacyDatastoreImportError;

fn dbfile_path() -> PathBuf {
let mut dir = appdirs::user_data_dir(Some("activitywatch"), None, false).unwrap();
let mut dir = appdirs::user_data_dir(Some("activitywatch"), Some("activitywatch"), false).unwrap();
Expand Down Expand Up @@ -157,6 +157,7 @@ mod import {
) -> Result<(), LegacyDatastoreImportError> {
let legacy_db_path = dbfile_path();
if !legacy_db_path.exists() {
info!("Did not find an old database, skipping legacy import");
return Ok(());
info!("Importing legacy DB");
Expand Down

0 comments on commit bb1f36d

Please sign in to comment.