Let pathclass.glob('.') return cwd.
This brings it more in line with regular glob for which glob('.') = ['.'].
This commit is contained in:
parent
9a0be7eda9
commit
8d258241e7
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue