mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-21 23:41:18 +01:00
don't remove trailing slash for root path
This commit is contained in:
parent
79ab296f1f
commit
efd9c0ccee
@ -45,7 +45,7 @@ function request_id() {
|
||||
// the path is resolved and decoded
|
||||
function path_list(pathname) {
|
||||
// remove double and trailing slashes
|
||||
pathname = pathname.replace(/\/\/+/g, "/").replace(/\/$/, "");
|
||||
pathname = pathname.replace(/\/\/+/g, "/").replace(/(.)\/$/, "$1");
|
||||
var list = pathname.split("/");
|
||||
list.shift();
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user