From 39e0da1652444287db2c5839a0059678a32685ea Mon Sep 17 00:00:00 2001 From: Jonas Kruckenberg Date: Sun, 17 Oct 2021 13:12:52 +0200 Subject: [PATCH] Fix log_dir (#2756) --- core/tauri/src/api/path.rs | 2 +- core/tauri/src/app.rs | 5 +++++ tooling/api/src/path.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/tauri/src/api/path.rs b/core/tauri/src/api/path.rs index 048148814..325a0580b 100644 --- a/core/tauri/src/api/path.rs +++ b/core/tauri/src/api/path.rs @@ -236,7 +236,7 @@ pub fn app_dir(config: &Config) -> Option { dirs_next::config_dir().map(|dir| dir.join(&config.tauri.bundle.identifier)) } -/// Returns the path to the log directory. +/// Returns the path to the suggested log directory. pub fn log_dir(config: &Config) -> Option { #[cfg(target_os = "macos")] let path = dirs_next::home_dir().map(|dir| { diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index c7a83a66f..998958837 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -162,6 +162,11 @@ impl PathResolver { pub fn app_dir(&self) -> Option { crate::api::path::app_dir(&self.config) } + + /// Returns the path to the suggested log directory. + pub fn log_dir(&self) -> Option { + crate::api::path::log_dir(&self.config) + } } /// A handle to the currently running application. diff --git a/tooling/api/src/path.ts b/tooling/api/src/path.ts index 3073457bb..80a472178 100644 --- a/tooling/api/src/path.ts +++ b/tooling/api/src/path.ts @@ -429,7 +429,7 @@ async function currentDir(): Promise { } /** - * Returns the path to the log directory. + * Returns the path to the suggested log directory. * * ### Platform-specific *