Skip to content

Commit 54f83ac

Browse files
jacopo-exactronf
authored andcommitted
Skip directories within ~/.ssh/config.d
close #784 Only parse files within the ~/.ssh/config.d directory, ignoring subdirectories. This conforms to the behaviour of ssh implementations that ignore `config.d` subdirs.
1 parent 8d5d7be commit 54f83ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asyncssh/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def _include(self, option: str, args: List[str]) -> None:
146146
else:
147147
path = self._default_path
148148

149-
paths = list(path.glob(pattern))
149+
paths = list(p for p in path.glob(pattern) if p.is_file())
150150

151151
if not paths:
152152
logger.debug1(f'Config pattern "{pattern}" matched no files')

0 commit comments

Comments
 (0)