Skip to content

Commit

Permalink
Merge pull request #676 from w3c/kgf-dot-slash
Browse files Browse the repository at this point in the history
Recognize ./index.html in tar files
  • Loading branch information
deniak authored Jan 31, 2025
2 parents 9668ab6 + 76fce86 commit c195f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function extractTar(tarFile) {
extract.on("entry", (header, stream, next) => {
stream.on("data", async data => {
if (uploadedFileIsAllowed(header.name)) {
if (!hasIndex && header.name === "index.html") {
if (header.name === "index.html" || header.name === "./index.html") {
hasIndex = true;
}
const filePath = `${uploadPath}/${header.name}`;
Expand Down

0 comments on commit c195f82

Please sign in to comment.