mirror of
https://github.com/9001/copyparty.git
synced 2026-11-10 12:18:22 +00:00
--ih: fix nav to webroot
Co-authored-by: Til Schmitter <til.schmitter@gmail.com>
This commit is contained in:
1 parent
8d7aa4f860
commit
334dccc55e
1 file changed
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user