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
reviewable/pr11395/r1
NiLuJe 3 months ago
parent e5cb24a891
commit 82bf8bf379

@ -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

Loading…
Cancel
Save