fixes #12209
This commit is contained in:
parent
638a4d9d9f
commit
48537fec81
1 changed files with 2 additions and 2 deletions
|
|
@ -1740,8 +1740,8 @@ template walkCommon(pattern: string, filter) =
|
|||
# that the file extensions have the same length ...
|
||||
let ff = getFilename(f)
|
||||
let idx = ff.len - pattern.len + dotPos
|
||||
if dotPos < 0 or idx >= ff.len or ff[idx] == '.' or
|
||||
pattern[dotPos+1] == '*':
|
||||
if dotPos < 0 or idx >= ff.len or (idx >= 0 and ff[idx] == '.') or
|
||||
(dotPos >= 0 and dotPos+1 < pattern.len and pattern[dotPos+1] == '*'):
|
||||
yield splitFile(pattern).dir / extractFilename(ff)
|
||||
if findNextFile(res, f) == 0'i32:
|
||||
let errCode = getLastError()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue