mirror of
https://github.com/lxsang/silk.git
synced 2024-12-26 21:08:22 +01:00
fix: incorrect directory mime query
All checks were successful
gitea-sync/silk/pipeline/head This commit looks good
All checks were successful
gitea-sync/silk/pipeline/head This commit looks good
This commit is contained in:
parent
7c2e44f178
commit
34c2d3ae4e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user