Fix behaviour of empty .mbedignore

Should ignore nothing, currently ignores everything
An empty .mbedignore is easy to create when tinkering with a local repo
pull/5315/head
Christopher Haster 2017-10-13 11:52:13 -05:00 committed by GitHub
parent 20d93bf78d
commit 9fd6c5ae56
1 changed files with 2 additions and 1 deletions

View File

@ -615,7 +615,8 @@ class mbedToolchain:
self.ignore_patterns.extend(normcase(p) for p in patterns)
else:
self.ignore_patterns.extend(normcase(join(real_base, pat)) for pat in patterns)
self._ignore_regex = re.compile("|".join(fnmatch.translate(p) for p in self.ignore_patterns))
if self.ignore_patterns:
self._ignore_regex = re.compile("|".join(fnmatch.translate(p) for p in self.ignore_patterns))
# Create a Resources object from the path pointed to by *path* by either traversing a
# a directory structure, when *path* is a directory, or adding *path* to the resources,