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 *