From 01f718c203ee527b88c3e81a5be67a7b8723088a Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:38:03 +0200 Subject: [PATCH] platform-aware separator for displaying MountPoint Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com> --- lib/menu.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/menu.ts b/lib/menu.ts index c862a9a..5f8db0e 100644 --- a/lib/menu.ts +++ b/lib/menu.ts @@ -1,5 +1,6 @@ import * as Sentry from '@sentry/browser' import { Menu, MenuItem, PredefinedMenuItem, Submenu } from '@tauri-apps/api/menu' +import { sep } from '@tauri-apps/api/path' import { getCurrentWindow } from '@tauri-apps/api/window' import { ask, message, open } from '@tauri-apps/plugin-dialog' import { exists, mkdir, remove } from '@tauri-apps/plugin-fs' @@ -259,13 +260,13 @@ async function parseRemotes(remotes: string[]) { for (const currentMount of currentRemoteMounts) { console.log( '[parseRemotes] Adding Unmount (' + - currentMount.MountPoint.split('/').pop() + + currentMount.MountPoint.split(sep()).pop() + ') for ', remote ) const unmountMenuItem = await MenuItem.new({ id: `unmount-${remote}-${currentMount.MountPoint}`, - text: 'Unmount (' + currentMount.MountPoint.split('/').pop() + ')', + text: 'Unmount (' + currentMount.MountPoint.split(sep()).pop() + ')', action: async () => { try { await showLoadingTray()