diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index 789c230..0f1b30d 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -42,7 +42,6 @@ class NotFile(PathclassException): class NotLink(PathclassException): pass - class Extension: def __init__(self, ext): if isinstance(ext, Extension): @@ -82,7 +81,6 @@ class Extension: return '' return '.' + self.ext - class Path: ''' I started to use pathlib.Path, but it was too much of a pain. @@ -208,8 +206,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') - pattern = self.with_child(pattern) - children = winglob.glob(pattern.absolute_path) + pattern = os.path.join(self.absolute_path, pattern) + children = winglob.glob(pattern) children = [self.with_child(child) for child in children] return children @@ -337,7 +335,6 @@ class Path: def with_child(self, basename): return self.join(os.path.basename(basename)) - def common_path(paths, fallback): ''' Given a list of file paths, determine the deepest path which all