1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00

Fix file server crash (denoland/deno_std#20)

Fix denoland/deno_std#19
Original: d9ab8eb003
This commit is contained in:
Bartek Iwańczuk 2018-12-12 18:47:58 +01:00 committed by Ryan Dahl
parent c4e20b746f
commit 10daa2982a

View file

@ -109,8 +109,7 @@ async function serveDir(req: ServerRequest, dirPath: string, dirName: string) {
for (const info of fileInfos) { for (const info of fileInfos) {
if (info.name === "index.html" && info.isFile()) { if (info.name === "index.html" && info.isFile()) {
// in case index.html as dir... // in case index.html as dir...
await serveFile(req, info.path); return await serveFile(req, info.path);
return;
} }
// Yuck! // Yuck!
let mode = null; let mode = null;