diff --git a/.changes/log-file-fix-for-linux-and-windows.md b/.changes/log-file-fix-for-linux-and-windows.md new file mode 100644 index 000000000..6bcbc8e21 --- /dev/null +++ b/.changes/log-file-fix-for-linux-and-windows.md @@ -0,0 +1,5 @@ +--- +'tauri': minor:bug +--- + +Fix default log path for linux and windows diff --git a/core/tauri/src/path/desktop.rs b/core/tauri/src/path/desktop.rs index 96ae8a10b..23356add8 100644 --- a/core/tauri/src/path/desktop.rs +++ b/core/tauri/src/path/desktop.rs @@ -232,9 +232,9 @@ impl PathResolver { /// /// ## Platform-specific /// - /// - **Linux:** Resolves to [`config_dir`]`/${bundle_identifier}/logs`. + /// - **Linux:** Resolves to [`data_local_dir`]`/${bundle_identifier}/logs`. /// - **macOS:** Resolves to [`home_dir`]`/Library/Logs/${bundle_identifier}` - /// - **Windows:** Resolves to [`config_dir`]`/${bundle_identifier}/logs`. + /// - **Windows:** Resolves to [`data_local_dir`]`/${bundle_identifier}/logs`. pub fn app_log_dir(&self) -> Result { #[cfg(target_os = "macos")] let path = dirs_next::home_dir().ok_or(Error::UnknownPath).map(|dir| { @@ -244,7 +244,7 @@ impl PathResolver { }); #[cfg(not(target_os = "macos"))] - let path = dirs_next::config_dir() + let path = dirs_next::data_local_dir() .ok_or(Error::UnknownPath) .map(|dir| { dir