From 334dccc55e4f6e6be6500157fb477ae594e007a4 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 27 Sep 2026 18:23:08 +0000 Subject: [PATCH] --ih: fix nav to webroot Co-authored-by: Til Schmitter --- copyparty/web/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index f50710e7f..d08a138bb 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -853,7 +853,7 @@ function vjoin(p1, p2) { if (!p2) p2 = ''; - if (p1.endsWith('/')) + if (p1 != '/' && p1.endsWith('/')) p1 = p1.slice(0, -1); if (p2.startsWith('/')) @@ -865,7 +865,7 @@ function vjoin(p1, p2) { if (!p2) return p1; - return p1 + '/' + p2; + return p1 == '/' ? p1 + p2 : p1 + '/' + p2; }