Skip to content

Commit 623dfb4

Browse files
committed
fix: corrected non-standard log dir on macOS (fixes #187)
1 parent a561beb commit 623dfb4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

aw-server/src/dirs.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ pub fn get_cache_dir() -> Result<PathBuf, ()> {
5454

5555
#[cfg(not(target_os = "android"))]
5656
pub fn get_log_dir() -> Result<PathBuf, ()> {
57-
let mut dir = appdirs::user_cache_dir(Some("activitywatch"), None)?;
58-
dir.push("log");
57+
let mut dir = appdirs::user_log_dir(Some("activitywatch"), None)?;
5958
dir.push("aw-server-rust");
60-
fs::create_dir_all(dir.clone()).expect("Unable to create cache dir");
59+
fs::create_dir_all(dir.clone()).expect("Unable to create log dir");
6160
Ok(dir)
6261
}
6362

0 commit comments

Comments
 (0)