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
4
index.js
4
index.js
|
@ -38,7 +38,9 @@ app.get("/*", (req, res) => {
|
|||
|
||||
res.write(baseStart)
|
||||
|
||||
res.write('<a href="../">Parent Directory</a><br>')
|
||||
if (file != '') {
|
||||
res.write('<a href="../">Parent Directory</a><br>')
|
||||
}
|
||||
|
||||
for (let index = 0; index < dirContents.length; index++) {
|
||||
const file = dirContents[index];
|
||||
|
|
Loading…
Reference in a new issue