mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
* fix: default log path for linux and windows updated (fix: #6809) * fix impl after reset
This commit is contained in:
5
.changes/log-file-fix-for-linux-and-windows.md
Normal file
5
.changes/log-file-fix-for-linux-and-windows.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri': minor:bug
|
||||
---
|
||||
|
||||
Fix default log path for linux and windows
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user