fix(dashboard): oldfiles filter should return a boolean instead of the result of find. Fixes #2283

This commit is contained in:
Folke Lemaitre 2025-10-19 23:01:57 +02:00
parent 308d7d263c
commit fcd309f9ea
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -807,7 +807,7 @@ function M.oldfiles(opts)
done[file] = true done[file] = true
for _, f in ipairs(filter) do for _, f in ipairs(filter) do
local matches = file:sub(1, #f.path) == f.path local matches = file:sub(1, #f.path) == f.path
and (file == f.path or file:sub(#f.path + 1, #f.path + 1):find("[/\\]")) and (file == f.path or file:sub(#f.path + 1, #f.path + 1):find("[/\\]") ~= nil)
if matches ~= f.want then if matches ~= f.want then
want = false want = false
break break