mirror of
https://github.com/lxsang/silk.git
synced 2024-12-26 12:58:22 +01:00
fix: ignore case when checking file type
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
adb81580a3
commit
eeea893d92
@ -37,10 +37,10 @@ setmetatable(default_mimes, {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
function std.mime(ext)
|
function std.mime(ext)
|
||||||
return default_mimes[ext]
|
return default_mimes[ext:lower()]
|
||||||
end
|
end
|
||||||
function std.extra_mime(name)
|
function std.extra_mime(name)
|
||||||
local ext = utils.ext(name)
|
local ext = utils.ext(name):lower()
|
||||||
local mpath = __ROOT__ .. "/" .. "mimes.json"
|
local mpath = __ROOT__ .. "/" .. "mimes.json"
|
||||||
if WWW_ROOT and not ulib.exists(mpath) then
|
if WWW_ROOT and not ulib.exists(mpath) then
|
||||||
LOG_DEBUG("No extra mimes found in %s", mpath)
|
LOG_DEBUG("No extra mimes found in %s", mpath)
|
||||||
|
Loading…
Reference in New Issue
Block a user