style(cache): removed hack for relative paths

This commit is contained in:
Folke Lemaitre 2023-02-27 20:25:03 +01:00
parent 5694483e87
commit b814d87089
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 0 additions and 7 deletions

View File

@ -231,13 +231,6 @@ function Cache.find(modname, opts)
local basename = modname:gsub("%.", "/") local basename = modname:gsub("%.", "/")
local idx = modname:find(".", 1, true) local idx = modname:find(".", 1, true)
-- HACK: some plugins try to load invalid relative paths (see #543)
if idx == 1 then
modname = modname:gsub("^%.+", "")
basename = modname:gsub("%.", "/")
idx = modname:find(".", 1, true)
end
local topmod = idx and modname:sub(1, idx - 1) or modname local topmod = idx and modname:sub(1, idx - 1) or modname
-- OPTIM: search for a directory first when topmod == modname -- OPTIM: search for a directory first when topmod == modname