Skip to content

Commit

Permalink
ScreenSaver: Properly exclude macOS resource forks again
Browse files Browse the repository at this point in the history
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 koreader#11390
Regression since koreader#11056
  • Loading branch information
NiLuJe committed Jan 19, 2024
1 parent 5f06016 commit 5f7f60c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/ui/screensaver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f7f60c

Please sign in to comment.