From 825d0a778cd58eee1df1694c3ff8262c79b00de3 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Fri, 3 Sep 2021 14:38:54 +0200 Subject: [PATCH] fixed missing ending "/" in path --- src/components/FileBrowser.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/FileBrowser.tsx b/src/components/FileBrowser.tsx index 7427600..f33a6bc 100644 --- a/src/components/FileBrowser.tsx +++ b/src/components/FileBrowser.tsx @@ -19,7 +19,11 @@ import pathRename from "../functions/pathRename" function uriToPath(pathname:string) { // strip the "/f" from e.g. "/f/dir1/dir2" - return pathname.substr(2) + const path = pathname.substr(2) + if (!path.endsWith("/")){ + return path + "/" + } + return path } function pathToUri(path:string) {