fix: incorrect directory mime query
All checks were successful
gitea-sync/silk/pipeline/head This commit looks good

This commit is contained in:
DanyLE 2023-04-24 09:56:57 +02:00
parent 7c2e44f178
commit 34c2d3ae4e

View File

@ -76,6 +76,9 @@ function std.extra_mime(name)
end end
function std.mimeOf(name) function std.mimeOf(name)
if ulib.is_dir(name) then
return "dir"
end
local mime = std.mime(utils.ext(name)) local mime = std.mime(utils.ext(name))
if mime ~= "application/octet-stream" then if mime ~= "application/octet-stream" then
return mime return mime