ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
https://activitywatch.net/
Mozilla Public License 2.0
12.43k stars 558 forks source link

Configuration of data/config/log directories has discrepancy between OSes that causes aw-server-rust to place it's folders in the program's Parent folder on Windows #1068

Open AyoungDukie opened 5 months ago

AyoungDukie commented 5 months ago

the aw-server-rust module uses the crate call below from appdirs to find the desired configuration directory:

appdirs::user_config_dir(Some("activitywatch"), None, false)

This works as expected for other platforms, but seems to be the culprit of the below resultant folder structure: image compared to the main (sub)folder: image

The code for the first run legacy import uses a modified call to ensure the correct location is selected:

appdirs::user_data_dir(Some("activitywatch"), Some("activitywatch"), false)

This can probably be broken up into pieces as

-Any Windows:

Additional context

Any changes decided here should be coordinated with updates to the documentation about the folder configurations as needed. https://docs.activitywatch.net/en/latest/directories.html

github-actions[bot] commented 5 months ago

Hi there! As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct. Thanks a bunch for opening your first issue! 🙏