Fix pathclass.glob actually only looking at cwd.

In other news, don't ever trust anything I do.
This commit is contained in:
Ethan Dalool 2020-07-16 21:28:40 -07:00
parent ff9895a390
commit 453b2d2fb1

View file

@ -158,7 +158,8 @@ class Path:
# If the user wants to glob names in a different path, they should
# create a Pathclass for that directory first and do it normally.
raise TypeError('glob pattern should not have path separators')
children = winglob.glob(pattern)
pattern = self.with_child(pattern)
children = winglob.glob(pattern.absolute_path)
children = [self.with_child(child) for child in children]
return children