Skip to content

Commit 964c019

Browse files
committed
[mdir] Relax regular expression to match all filenames but hidden ones
1 parent fa6b4e6 commit 964c019

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Changes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Changes in 2.4.1 (WIP)
2+
3+
Fixed:
4+
5+
- [mdir] Relax regular expression to match all filenames but hidden ones
6+
17
# Changes in 2.4.0
28

39
IMPORTANT:

widgets/mdir_all.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ function mdir_all.async(format, warg, callback)
3939
if starting_points == "" then return callback{ 0, 0 } end
4040

4141
local new, cur = 0, 0
42+
local find = "find" .. starting_points .. " -type f ! -path '*/.*'"
4243
spawn.with_line_callback(
43-
"find" .. starting_points .. " -type f -regex '.*/cur/.*2,[^S]*$';",
44+
find .. " -path '*/cur/*'",
4445
{ stdout = function (filename) cur = cur + 1 end,
4546
output_done = function ()
4647
spawn.with_line_callback(
47-
"find" .. starting_points .. " -type f -path '*/new/*';",
48+
find .. " -path '*/new/*'",
4849
{ stdout = function (filename) new = new + 1 end,
4950
output_done = function () callback{ new, cur } end })
5051
end })

0 commit comments

Comments
 (0)