From 1ba035e14b69ac0de519c96c439bf8a86deb8404 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Mon, 23 Feb 2026 23:08:24 +0530 Subject: [PATCH] fix: debug linux registration failing on flatpak --- src/helpers/use-linux-registerer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/use-linux-registerer.ts b/src/helpers/use-linux-registerer.ts index f4b33b4..107f0e8 100644 --- a/src/helpers/use-linux-registerer.ts +++ b/src/helpers/use-linux-registerer.ts @@ -3,6 +3,7 @@ import * as fs from "@tauri-apps/plugin-fs"; import { useKvPairs } from "@/helpers/use-kvpairs"; import { useSettingsPageStatesStore } from "@/services/store"; import { invoke } from "@tauri-apps/api/core"; +import { useLogger } from "@/helpers/use-logger"; interface FileMap { source: string; @@ -12,6 +13,7 @@ interface FileMap { export function useLinuxRegisterer() { const { saveKvPair } = useKvPairs(); + const LOG = useLogger(); const appVersion = useSettingsPageStatesStore(state => state.appVersion); const registerToLinux = async () => { @@ -27,6 +29,8 @@ export function useLinuxRegisterer() { const homeDirPath = await homeDir(); const configDirPath = await configDir(); + LOG.info("LINUX REGISTERER", `Starting registration process. isFlatpak: ${isFlatpak}, resourceDirPath: ${resourceDirPath}, homeDirPath: ${homeDirPath}, configDirPath: ${configDirPath}`); + for (const file of filesToCopy) { const sourcePath = await join(resourceDirPath, file.source); const destinationDir = isFlatpak ? await join(configDirPath, file.dir) : await join(homeDirPath, file.dir); @@ -47,6 +51,7 @@ export function useLinuxRegisterer() { return { success: true, message: 'Registered successfully' } } catch (error) { console.error('Error copying files:', error); + LOG.error("LINUX REGISTERER", `Error during registration: ${error}`); return { success: false, message: 'Failed to register' } } }