mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user