diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2019-05-21 02:44:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-21 02:44:36 -0400 |
| commit | 7c4e973611af274c25acb38d0b8e674599ab8da7 (patch) | |
| tree | 65b3b635cd27b20eb0cd4136e38f0969a6911ca5 /http | |
| parent | 16e52ee4b000870da8ef570e5182e3d14ca41d03 (diff) | |
Bump v0.6.0 (denoland/deno_std#423)
Original: https://github.com/denoland/deno_std/commit/47134db9f24de802bee560941584bbc32e75a9c3
Diffstat (limited to 'http')
| -rwxr-xr-x | http/file_server.ts | 7 |
1 files changed, 4 insertions, 3 deletions
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() |
