fix: default log path for linux and windows updated (fix: #6809) (#6827)

* fix: default log path for linux and windows updated (fix: #6809)

* fix impl after reset
This commit is contained in:
Andzej Korovacki
2023-05-21 16:38:20 +03:00
committed by GitHub
parent 3256a37263
commit 8e85576506
2 changed files with 8 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
---
'tauri': minor:bug
---
Fix default log path for linux and windows

View File

@@ -232,9 +232,9 @@ impl<R: Runtime> PathResolver<R> {
///
/// ## 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<PathBuf> {
#[cfg(target_os = "macos")]
let path = dirs_next::home_dir().ok_or(Error::UnknownPath).map(|dir| {
@@ -244,7 +244,7 @@ impl<R: Runtime> PathResolver<R> {
});
#[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