mirror of
https://github.com/antos-rde/antos-backend.git
synced 2024-11-20 04:18:23 +01:00
fix: mime fetching bug of directory
All checks were successful
gitea-sync/antos-backend/pipeline/head This commit looks good
All checks were successful
gitea-sync/antos-backend/pipeline/head This commit looks good
This commit is contained in:
parent
54a0a130b2
commit
4f697d0f70
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user