Skip to content

Commit

Permalink
fix: corrected non-standard log dir on macOS (fixes #187)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 23, 2020
1 parent a561beb commit 623dfb4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aw-server/src/dirs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ pub fn get_cache_dir() -> Result<PathBuf, ()> {

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

Expand Down

0 comments on commit 623dfb4

Please sign in to comment.