diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index 9d1c574..0011707 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -620,6 +620,12 @@ def glob(pattern): If you want to recurse, consider using spinal.walk with glob_filenames instead. ''' + if pattern == '.': + return [cwd()] + + elif pattern == '..': + return [cwd().parent] + (dirname, pattern) = os.path.split(pattern) return Path(dirname).glob(pattern)