From 3e00e686b6fe76709fd6f0ac1696eebbac1e9fb5 Mon Sep 17 00:00:00 2001 From: yparitcher Date: Thu, 13 Feb 2020 03:43:10 -0500 Subject: [PATCH] file count: Fixes #5843 (#5858) --- frontend/ui/widget/filechooser.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/ui/widget/filechooser.lua b/frontend/ui/widget/filechooser.lua index ba247d3c1..67c2990d4 100644 --- a/frontend/ui/widget/filechooser.lua +++ b/frontend/ui/widget/filechooser.lua @@ -62,8 +62,8 @@ function FileChooser:init() if ok then for f in iter, dir_obj do if count_only then - if (not self.show_hidden and not util.stringStartsWith(f, ".")) - or (self.show_hidden and f ~= "." and f ~= ".." and self.dir_filter(f) and not util.stringStartsWith(f, "._")) + if self.dir_filter(f) and ((not self.show_hidden and not util.stringStartsWith(f, ".")) + or (self.show_hidden and f ~= "." and f ~= ".." and not util.stringStartsWith(f, "._"))) then table.insert(dirs, true) end