mirror of
https://github.com/9001/copyparty.git
synced 2026-10-05 14:31:09 +01:00
--ih: fix nav to webroot
Co-authored-by: Til Schmitter <til.schmitter@gmail.com>
This commit is contained in:
@@ -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