Hide parent dir button if in root
This commit is contained in:
parent
7faecc66b9
commit
97d5ad79f5
1 changed files with 3 additions and 1 deletions
2
index.js
2
index.js
|
@ -38,7 +38,9 @@ app.get("/*", (req, res) => {
|
||||||
|
|
||||||
res.write(baseStart)
|
res.write(baseStart)
|
||||||
|
|
||||||
|
if (file != '') {
|
||||||
res.write('<a href="../">Parent Directory</a><br>')
|
res.write('<a href="../">Parent Directory</a><br>')
|
||||||
|
}
|
||||||
|
|
||||||
for (let index = 0; index < dirContents.length; index++) {
|
for (let index = 0; index < dirContents.length; index++) {
|
||||||
const file = dirContents[index];
|
const file = dirContents[index];
|
||||||
|
|
Loading…
Reference in a new issue