diff --git a/modules/stuff.js b/modules/stuff.js index 526fdb4..3918358 100644 --- a/modules/stuff.js +++ b/modules/stuff.js @@ -155,16 +155,17 @@ app.get('/*', function (req, res) { fs.readdirSync(curr).forEach((item) => { if (item[0] !== '.') { let res = { name: item } - let stats = fs.statSync(curr + '/' + item) + let stat = fs.statSync(curr + '/' + item) - let fileSizeInBytes = stats['size'] + let fileSizeInBytes = stat['size'] res.size = Math.round(fileSizeInBytes / 1000000) res.path = relPath if (res.path[res.path.length - 1] !== '/') { res.path += '/' } res.path += item - res.mtime = stats['mtime'].toLocaleString() + res.mtime = stat['mtime'].toLocaleString() + res.isDir = stat.isDirectory() f.push(res) } diff --git a/views/stuff/folders.ejs b/views/stuff/folders.ejs index cb75e84..e6dd742 100644 --- a/views/stuff/folders.ejs +++ b/views/stuff/folders.ejs @@ -93,7 +93,17 @@ <%=folders[i].mtime %>