From 6400c3a54651dc339072ff94b24eefa4505387b3 Mon Sep 17 00:00:00 2001 From: jonnyl2 <95502269+jonnyl2@users.noreply.github.com> Date: Fri, 14 Jun 2024 12:48:51 +0200 Subject: [PATCH] Styletweaks menu: Ignore ._ files (#12022) Ignore files starting with "._" (metafiles by MacOS), that will otherwise show up in the Styletweaks menu. (These files are alrady ignored in the File manager, even when 'show hidden files' is enabled.) --- frontend/apps/reader/modules/readerstyletweak.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerstyletweak.lua b/frontend/apps/reader/modules/readerstyletweak.lua index 606a2dffe..13f39ffe5 100644 --- a/frontend/apps/reader/modules/readerstyletweak.lua +++ b/frontend/apps/reader/modules/readerstyletweak.lua @@ -632,7 +632,7 @@ You can enable individual tweaks on this book with a tap, or view more details a local mode = lfs.attributes(dir.."/"..f, "mode") if mode == "directory" then table.insert(dir_list, f) - elseif mode == "file" and string.match(f, "%.css$") then + elseif mode == "file" and string.match(f, "%.css$") and not util.stringStartsWith(f, "._") then table.insert(file_list, f) end end