ScreenSaver: Properly exclude macOS resource forks again

The previous check was inlined in the dir walk, so it always saw a
relative path.
Here, it gets an absolute one instead, so act accordingly ;).

Fix #11390
Regression since #11056
This commit is contained in:
NiLuJe
2024-01-19 19:51:31 +01:00
parent e5cb24a891
commit 82bf8bf379

View File

@@ -79,7 +79,7 @@ end
local function _getRandomImage(dir)
if not dir then return end
local match_func = function(file) -- images, ignore macOS resource forks
return not util.stringStartsWith(file, "._") and DocumentRegistry:isImageFile(file)
return not util.stringStartsWith(ffiUtil.basename(file), "._") and DocumentRegistry:isImageFile(file)
end
return filemanagerutil.getRandomFile(dir, match_func)
end