diff --git a/lib/rclone/init.ts b/lib/rclone/init.ts index d4b70bd..32851db 100644 --- a/lib/rclone/init.ts +++ b/lib/rclone/init.ts @@ -28,7 +28,7 @@ import { export async function initRclone(args: string[]) { console.log('[initRclone] starting with args:', args) - const system = !(await invoke('is_flathub')) && (await isSystemRcloneInstalled()) + const system = !(await invoke('is_flatpak')) && (await isSystemRcloneInstalled()) console.log('[initRclone] system rclone installed:', system) let internal = await isInternalRcloneInstalled() console.log('[initRclone] internal rclone installed:', internal) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 9880e2c..c2fc80a 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -31,7 +31,7 @@ fn show_toolbar(app_handle: AppHandle) -> Result<(), String> { } #[tauri::command] -fn is_flathub() -> bool { +fn is_flatpak() -> bool { std::path::Path::new("/.flatpak-info").exists() || std::env::var_os("FLATPAK_ID").is_some() } @@ -787,7 +787,7 @@ pub fn run() { let mut builder = tauri::Builder::default(); - if !is_flathub() { + if !is_flatpak() { builder = builder .plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| { let _ = shortcut::show_toolbar_window(app); @@ -827,7 +827,7 @@ pub fn run() { show_toolbar, update_system_rclone, test_proxy_connection, - is_flathub, + is_flatpak, open_full_window, open_window, open_small_window, @@ -842,7 +842,7 @@ pub fn run() { { // Flatpak/Flathub sandbox typically cannot write to system desktop/mime locations. // Deep-link registration is best-effort; never fail app startup. - if is_flathub() { + if is_flatpak() { log::info!("skipping deep-link registration in Flatpak/Flathub"); } else { use tauri_plugin_deep_link::DeepLinkExt; diff --git a/src/pages/Settings/GeneralSection.tsx b/src/pages/Settings/GeneralSection.tsx index 572bd19..1d47fc2 100644 --- a/src/pages/Settings/GeneralSection.tsx +++ b/src/pages/Settings/GeneralSection.tsx @@ -32,7 +32,7 @@ export default function GeneralSection() { const flathubQuery = useQuery({ queryKey: ['flathub'], queryFn: async () => { - const flathub = await invoke('is_flathub') + const flathub = await invoke('is_flatpak') return flathub }, })