From 7f2cbf4d4d342f5a743a3e5762e549026d0935d8 Mon Sep 17 00:00:00 2001 From: mircearoata Date: Wed, 15 May 2024 20:49:35 +0200 Subject: [PATCH] Fix multiple folders being highlighted in server picker --- frontend/src/lib/components/RemoteServerPicker.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/RemoteServerPicker.svelte b/frontend/src/lib/components/RemoteServerPicker.svelte index 482a506c..ce16c502 100644 --- a/frontend/src/lib/components/RemoteServerPicker.svelte +++ b/frontend/src/lib/components/RemoteServerPicker.svelte @@ -165,6 +165,12 @@ // If the path is root and it is a valid install, don't list contents of root $: actualDisplayedItems = (valid && displayedPath === trimmedPath) ? [{ path: '', name: '(root)', isValidInstall: true }] : displayedItems; + + function isSamePath(path1: string, path2: string) { + let parts1 = _.compact(path1.split(pathSeparator)); + let parts2 = _.compact(path2.split(pathSeparator)); + return _.isEqual(parts1, parts2); + }
@@ -180,7 +186,7 @@ {#each actualDisplayedItems as item}