fix: strip root /

This commit is contained in:
Derrick Hammer 2023-11-18 08:34:16 -05:00
parent ad68d92c57
commit 165ead6a80
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,9 @@ export default class S5Provider implements ContentProvider {
}
file = meta.paths[urlPath];
} else {
if (urlPath.startsWith("/")) {
urlPath = urlPath.substring(1);
}
if (!(urlPath in meta.paths)) {
throw new Error("404");
}