From e21883a8d03624a4fab50bb6a20f83fec4ab6250 Mon Sep 17 00:00:00 2001
From: FTCHD <144691102+FTCHD@users.noreply.github.com>
Date: Mon, 15 Dec 2025 00:04:34 +0700
Subject: [PATCH] Mount error & visual enhancements
Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
---
main.ts | 19 +++++++++++++------
src/components/RemoteAutoMountDrawer.tsx | 4 ++++
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/main.ts b/main.ts
index 43aee65..933ce49 100644
--- a/main.ts
+++ b/main.ts
@@ -485,7 +485,9 @@ async function startupMounts() {
'[startupMounts] remote config mount point is not empty',
remoteConfig.mountOnStart.mountPoint
)
- continue
+ throw new Error(
+ `Mount point for ${remote} is not empty, make sure ${remoteConfig.mountOnStart.mountPoint} is empty`
+ )
}
const {
@@ -525,11 +527,16 @@ async function startupMounts() {
} catch (error) {
console.error('Error mounting remote:', error)
Sentry.captureException(error)
- await message(`Failed to mount ${remote} on startup.`, {
- title: 'Automount Error',
- kind: 'error',
- okLabel: 'Got it',
- })
+ await message(
+ error instanceof Error
+ ? error.message
+ : `Failed to mount ${remote} on startup.`,
+ {
+ title: 'Automount Error',
+ kind: 'error',
+ okLabel: 'Got it',
+ }
+ )
}
}
}
diff --git a/src/components/RemoteAutoMountDrawer.tsx b/src/components/RemoteAutoMountDrawer.tsx
index 4535403..b9b91e1 100644
--- a/src/components/RemoteAutoMountDrawer.tsx
+++ b/src/components/RemoteAutoMountDrawer.tsx
@@ -309,6 +309,7 @@ export default function RemoteAutoMountDrawer({
/>