From 7c4e973611af274c25acb38d0b8e674599ab8da7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 21 May 2019 02:44:36 -0400 Subject: Bump v0.6.0 (denoland/deno_std#423) Original: https://github.com/denoland/deno_std/commit/47134db9f24de802bee560941584bbc32e75a9c3 --- http/file_server.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'http') diff --git a/http/file_server.ts b/http/file_server.ts index 6a3fb9e45..21482e747 100755 --- a/http/file_server.ts +++ b/http/file_server.ts @@ -149,19 +149,20 @@ async function serveDir( const listEntry: string[] = []; const fileInfos = await readDir(dirPath); for (const info of fileInfos) { + let fn = dirPath + "/" + info.name; if (info.name === "index.html" && info.isFile()) { // in case index.html as dir... - return await serveFile(req, info.path); + return await serveFile(req, fn); } // Yuck! let mode = null; try { - mode = (await stat(info.path)).mode; + mode = (await stat(fn)).mode; } catch (e) {} listEntry.push( createDirEntryDisplay( info.name, - dirName + "/" + info.name, + fn, info.isFile() ? info.len : null, mode, info.isDirectory() -- cgit v1.2.3