mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 19:10:38 +02:00
don't remove trailing slash for root path
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user