mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
This commit is contained in:
parent
d3f61a2de6
commit
ae882f7984
11 changed files with 57 additions and 4 deletions
|
@ -13,7 +13,7 @@ def glob(pathname):
|
|||
|
||||
"""
|
||||
if not has_magic(pathname):
|
||||
if os.path.exists(pathname):
|
||||
if os.path.lexists(pathname):
|
||||
return [pathname]
|
||||
else:
|
||||
return []
|
||||
|
@ -29,7 +29,7 @@ def glob(pathname):
|
|||
for dirname in list:
|
||||
if basename or os.path.isdir(dirname):
|
||||
name = os.path.join(dirname, basename)
|
||||
if os.path.exists(name):
|
||||
if os.path.lexists(name):
|
||||
result.append(name)
|
||||
else:
|
||||
result = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue