Fix path object convertion to string

For Windows path, there is a difference between `str(p)` &
`p.as_posix()`
pull/83600/head
HS-157 3 weeks ago
parent be6e985313
commit 2b7ed0fdd2

@ -0,0 +1,2 @@
minor_changes:
- fileglob lookup - Pattern matching on directory & file (https://github.com/ansible/ansible/pull/83600)

@ -91,7 +91,7 @@ class LookupModule(LookupBase):
for term in terms:
for path in found_paths:
term_results = [
to_text(g.as_posix(), errors="surrogate_or_strict")
to_text(str(g), errors="surrogate_or_strict")
for g in path.glob(term)
if g.is_file()
]

Loading…
Cancel
Save