Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists in glob.glob.

This commit is contained in:
Johannes Gijsbers 2004-08-30 10:19:56 +00:00
parent d3f61a2de6
commit ae882f7984
11 changed files with 57 additions and 4 deletions

View file

@ -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 = []