Jonas Kruckenberg 3 anni fa
parent
commit
39e0da1652
3 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 1 1
      core/tauri/src/api/path.rs
  2. 5 0
      core/tauri/src/app.rs
  3. 1 1
      tooling/api/src/path.ts

+ 1 - 1
core/tauri/src/api/path.rs

@@ -236,7 +236,7 @@ pub fn app_dir(config: &Config) -> Option<PathBuf> {
   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<PathBuf> {
   #[cfg(target_os = "macos")]
   let path = dirs_next::home_dir().map(|dir| {

+ 5 - 0
core/tauri/src/app.rs

@@ -162,6 +162,11 @@ impl PathResolver {
   pub fn app_dir(&self) -> Option<PathBuf> {
     crate::api::path::app_dir(&self.config)
   }
+
+  /// Returns the path to the suggested log directory.
+  pub fn log_dir(&self) -> Option<PathBuf> {
+    crate::api::path::log_dir(&self.config)
+  }
 }
 
 /// A handle to the currently running application.

+ 1 - 1
tooling/api/src/path.ts

@@ -429,7 +429,7 @@ async function currentDir(): Promise<string> {
 }
 
 /**
- * Returns the path to the log directory.
+ * Returns the path to the suggested log directory.
  *
  * ### Platform-specific
  *