From d4d1724e551de4ae8725e0384ea049e93abc5a6f Mon Sep 17 00:00:00 2001 From: Neyl-123 <97339070+Neyl-123@users.noreply.github.com> Date: Tue, 12 May 2026 18:50:25 +0200 Subject: [PATCH 1/2] Fix config dir opening on linux If the config file did not exist, the "Open Config Dir" button did just fail silently --- apps/desktop/src-tauri/Cargo.toml | 1 + apps/desktop/src-tauri/src/commands.rs | 10 ++++++++++ apps/desktop/src-tauri/src/main.rs | 2 ++ apps/desktop/src/views/settings/account.tsx | 4 +--- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index eee6e9af..1d022cf0 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -36,6 +36,7 @@ tauri-plugin-os = "2.2.0" tauri-plugin-http = "2.2.0" tauri-plugin-log = "2.2.0" tauri-plugin-notification = "2.2.0" +tauri-plugin-opener = "2.2.0" anyhow = "1.0.86" log = "0.4.22" diff --git a/apps/desktop/src-tauri/src/commands.rs b/apps/desktop/src-tauri/src/commands.rs index f0ef4f6a..52360bd1 100644 --- a/apps/desktop/src-tauri/src/commands.rs +++ b/apps/desktop/src-tauri/src/commands.rs @@ -233,3 +233,13 @@ pub fn set_hide_taskbar_when_pinned( hide_taskbar_when_pinned, ); } + +#[tauri::command] +pub fn open_config_dir(app: tauri::AppHandle) { + use tauri::Manager; + use tauri_plugin_opener::OpenerExt; + if let Ok(path) = app.path().app_config_dir() { + let _ = std::fs::create_dir_all(&path); + let _ = app.opener().open_path(path.to_string_lossy().to_string(), None::<&str>); + } +} diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs index 1408674e..f609ea6a 100644 --- a/apps/desktop/src-tauri/src/main.rs +++ b/apps/desktop/src-tauri/src/main.rs @@ -101,6 +101,7 @@ fn main() { .plugin(tauri_plugin_shell::init()) .plugin(tauri_plugin_os::init()) .plugin(tauri_plugin_http::init()) + .plugin(tauri_plugin_opener::init()) .plugin(log_plugin_builder.build()); #[cfg(not(debug_assertions))] @@ -172,6 +173,7 @@ fn main() { close_settings, open_settings, set_hide_taskbar_when_pinned, + open_config_dir, ]); app diff --git a/apps/desktop/src/views/settings/account.tsx b/apps/desktop/src/views/settings/account.tsx index c7c60765..92214514 100644 --- a/apps/desktop/src/views/settings/account.tsx +++ b/apps/desktop/src/views/settings/account.tsx @@ -22,10 +22,8 @@ import { usePin } from "@/hooks/use-pin"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Pin } from "lucide-react"; import type { VoiceUser } from "@/types"; -import * as shell from "@tauri-apps/plugin-shell"; export const Developer = () => { - const platformInfo = usePlatformInfo(); const DEV_TOKEN_BACKUP_KEY = "overlayed:dev:token-backup"; const DEV_TOKEN_EXPIRY_BACKUP_KEY = "overlayed:dev:token-expiry-backup"; const DEV_USER_DATA_BACKUP_KEY = "overlayed:dev:user-data-backup"; @@ -91,7 +89,7 @@ export const Developer = () => { size="sm" variant="outline" onClick={async () => { - await shell.open(platformInfo.configDir); + await invoke("open_config_dir"); }} > Open Config Dir From 33af6c174dac63f6054e652939c182de22f99780 Mon Sep 17 00:00:00 2001 From: Neyl-123 <97339070+Neyl-123@users.noreply.github.com> Date: Wed, 13 May 2026 11:38:41 +0200 Subject: [PATCH 2/2] Fix format --- apps/desktop/src-tauri/src/commands.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src-tauri/src/commands.rs b/apps/desktop/src-tauri/src/commands.rs index 52360bd1..56145042 100644 --- a/apps/desktop/src-tauri/src/commands.rs +++ b/apps/desktop/src-tauri/src/commands.rs @@ -240,6 +240,8 @@ pub fn open_config_dir(app: tauri::AppHandle) { use tauri_plugin_opener::OpenerExt; if let Ok(path) = app.path().app_config_dir() { let _ = std::fs::create_dir_all(&path); - let _ = app.opener().open_path(path.to_string_lossy().to_string(), None::<&str>); + let _ = app + .opener() + .open_path(path.to_string_lossy().to_string(), None::<&str>); } }