diff --git a/v2/build/project.py b/v2/build/project.py index 083687544..c0cdb8649 100644 --- a/v2/build/project.py +++ b/v2/build/project.py @@ -978,7 +978,7 @@ attribute is allowed only for top-level 'project' invocations""") bad = 1 if bad: - self.registry.manager().errors()( + self.registry.manager.errors()( "The patterns to 'glob-tree' may not include directory") return self.registry.glob_internal(self.registry.current(), wildcards, excludes, "glob_tree") diff --git a/v2/util/path.py b/v2/util/path.py index 34c4373ce..222b96bfe 100644 --- a/v2/util/path.py +++ b/v2/util/path.py @@ -848,7 +848,7 @@ def glob_tree(roots, patterns, exclude_patterns=None): exclude_patterns = [] result = glob(roots, patterns, exclude_patterns) - subdirs = [s for s in result if s != "." and s != ".." and os.path.isdir(s)] + subdirs = [s for s in glob(roots, ["*"]) if s != "." and s != ".." and os.path.isdir(s)] if subdirs: result.extend(glob_tree(subdirs, patterns, exclude_patterns))