mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-04 15:40:20 -07:00
Fixed extension filtering in InventoryDirectory
This commit is contained in:
parent
bcfef8d0d4
commit
92bd755b47
1 changed files with 3 additions and 4 deletions
|
@ -40,8 +40,7 @@ class InventoryDirectory(object):
|
||||||
for i in self.names:
|
for i in self.names:
|
||||||
|
|
||||||
# Skip files that end with certain extensions or characters
|
# Skip files that end with certain extensions or characters
|
||||||
for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo"):
|
if any(i.endswith(ext) for ext in ("~", ".orig", ".bak", ".ini", ".retry", ".pyc", ".pyo")):
|
||||||
if i.endswith(ext):
|
|
||||||
continue
|
continue
|
||||||
# Skip hidden files
|
# Skip hidden files
|
||||||
if i.startswith('.') and not i.startswith('./'):
|
if i.startswith('.') and not i.startswith('./'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue