From 4f697d0f70c22ffeb5ae83f48604ddf76452a4ca Mon Sep 17 00:00:00 2001 From: DanyLE Date: Mon, 24 Apr 2023 09:56:04 +0200 Subject: [PATCH] fix: mime fetching bug of directory --- libs/vfs.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vfs.lua b/libs/vfs.lua index 12f9b1b..764e8f3 100644 --- a/libs/vfs.lua +++ b/libs/vfs.lua @@ -57,7 +57,7 @@ vfs.fileinfo = function(vfspath) end r.path = vfspath r.name = utils.basename(vfspath) - r.mime = std.mimeOf(r.name) + r.mime = std.mimeOf(ospath) return true, r else return false, "Resource not found" @@ -240,7 +240,7 @@ vfs.readDir = function(vfspath) end -- add extra mime type for k, v in pairs(r) do - v.mime = std.mimeOf(v.filename) + v.mime = std.mimeOf(ospath.."/"..v.filename) end return r end