Kaydet (Commit) 3fdffc9f authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #17923: glob() patterns ending with a slash no longer match non-dirs on

AIX.  Based on patch by Delhallt.
üst 67310859
...@@ -35,11 +35,16 @@ def iglob(pathname): ...@@ -35,11 +35,16 @@ def iglob(pathname):
patterns. patterns.
""" """
dirname, basename = os.path.split(pathname)
if not has_magic(pathname): if not has_magic(pathname):
if os.path.lexists(pathname): if basename:
yield pathname if os.path.lexists(pathname):
yield pathname
else:
# Patterns ending with a slash should match only directories
if os.path.isdir(dirname):
yield pathname
return return
dirname, basename = os.path.split(pathname)
if not dirname: if not dirname:
for name in glob1(os.curdir, basename): for name in glob1(os.curdir, basename):
yield name yield name
......
...@@ -19,6 +19,9 @@ Core and Builtins ...@@ -19,6 +19,9 @@ Core and Builtins
Library Library
------- -------
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular - Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method. __new__() method.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment