mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
fix: computation of file path
This commit is contained in:
parent
d29ad356d1
commit
c4725428e0
1 changed files with 4 additions and 5 deletions
|
|
@ -41,12 +41,11 @@ const container = ref<HTMLElement | null>(null);
|
|||
|
||||
const path = computed(() => {
|
||||
let basePath = fileStore.isFiles ? route.path : url.removeLastDir(route.path);
|
||||
if (!basePath.endsWith("/")) {
|
||||
basePath += "/";
|
||||
}
|
||||
basePath += props.name;
|
||||
|
||||
return basePath
|
||||
.replace(/^\/[^\/]+/, "")
|
||||
.split("/")
|
||||
.filter(Boolean);
|
||||
return basePath.split("/").filter(Boolean).splice(1);
|
||||
});
|
||||
|
||||
watch(path, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue