From 809ca9246410ded595630ef6620ccf927d79ae5c Mon Sep 17 00:00:00 2001 From: lq1405 <2769838458@qq.com> Date: Fri, 10 Jul 2026 19:25:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B5=8C=E5=A5=97?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E6=B5=8F=E8=A7=88=E7=A9=BA=E7=99=BD=E5=92=8C?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=89=AB=E6=8F=8F=E9=87=8D=E5=A4=8D=E6=8F=92?= =?UTF-8?q?=E5=85=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FileShare-Services/Services/FileLibrary/FileLibraryService.cs | 3 ++- FileShare-Web-VUE/src/router/index.ts | 2 +- FileShare-Web-VUE/src/views/BrowseView.vue | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/FileShare-Services/Services/FileLibrary/FileLibraryService.cs b/FileShare-Services/Services/FileLibrary/FileLibraryService.cs index 83234af..070cb1d 100644 --- a/FileShare-Services/Services/FileLibrary/FileLibraryService.cs +++ b/FileShare-Services/Services/FileLibrary/FileLibraryService.cs @@ -189,7 +189,8 @@ namespace FileShare_Services.Services.FileLibrary } var absolutePath = info.FullName; - seen.Add(absolutePath); + if (!seen.Add(absolutePath)) + continue; if (!existing.TryGetValue(absolutePath, out var record)) { diff --git a/FileShare-Web-VUE/src/router/index.ts b/FileShare-Web-VUE/src/router/index.ts index 1de24e8..4d40ffa 100644 --- a/FileShare-Web-VUE/src/router/index.ts +++ b/FileShare-Web-VUE/src/router/index.ts @@ -11,7 +11,7 @@ const router = createRouter({ { path: 'recent/added', name: 'recent-added', component: () => import('../views/RecentAddedView.vue') }, { path: 'recent/played', name: 'recent-played', component: () => import('../views/RecentPlayedView.vue') }, { path: 'browse/:rootId', name: 'browse', component: () => import('../views/BrowseView.vue'), props: true }, - { path: 'browse/:rootId/*', name: 'browse-path', component: () => import('../views/BrowseView.vue'), props: true }, + { path: 'browse/:rootId/:path(.*)', name: 'browse-path', component: () => import('../views/BrowseView.vue'), props: true }, { path: 'search', name: 'search', component: () => import('../views/SearchView.vue') }, ], }, diff --git a/FileShare-Web-VUE/src/views/BrowseView.vue b/FileShare-Web-VUE/src/views/BrowseView.vue index e24251c..cfacc6e 100644 --- a/FileShare-Web-VUE/src/views/BrowseView.vue +++ b/FileShare-Web-VUE/src/views/BrowseView.vue @@ -34,7 +34,7 @@ const rootId = computed(() => Number(route.params.rootId)) const pathFromRoute = computed(() => { const wildcard = route.params.path as string | undefined if (!wildcard) return '' - return decodeURIComponent(wirecard) + return decodeURIComponent(wildcard) }) const browsePathArray = computed(() => pathFromRoute.value ? pathFromRoute.value.split('/') : []) const currentBrowsePath = computed(() => browsePathArray.value.join('/'))