From 82bf8bf379a5227697ba395dcccd4f3886b32f01 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Fri, 19 Jan 2024 19:51:31 +0100 Subject: [PATCH] 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 --- frontend/ui/screensaver.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/screensaver.lua b/frontend/ui/screensaver.lua index 019cebf88..8c42ef778 100644 --- a/frontend/ui/screensaver.lua +++ b/frontend/ui/screensaver.lua @@ -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