fix(cache): overwrite cache entry with new modpath when loading a file. Fixes #90

This commit is contained in:
Folke Lemaitre 2022-12-22 09:10:11 +01:00
parent 63042310f4
commit 2200284165
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 0 deletions

View File

@ -126,6 +126,7 @@ function M.load(modkey, modpath)
local entry = M.cache[modkey] local entry = M.cache[modkey]
if entry then if entry then
entry.modpath = modpath
entry.used = os.time() entry.used = os.time()
if M.eq(entry.hash, hash) then if M.eq(entry.hash, hash) then
-- found in cache and up to date -- found in cache and up to date