mirror of
https://github.com/python/cpython
synced 2026-09-29 09:25:29 +03:00
Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
This commit is contained in:
commit
2a140fb58b
2 changed files with 12 additions and 4 deletions
13
Lib/glob.py
13
Lib/glob.py
|
|
@ -26,11 +26,16 @@ def iglob(pathname):
|
|||
patterns.
|
||||
|
||||
"""
|
||||
if not has_magic(pathname):
|
||||
if os.path.lexists(pathname):
|
||||
yield pathname
|
||||
return
|
||||
dirname, basename = os.path.split(pathname)
|
||||
if not has_magic(pathname):
|
||||
if basename:
|
||||
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
|
||||
if not dirname:
|
||||
yield from glob1(None, basename)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
|
||||
AIX. Based on patch by Delhallt.
|
||||
|
||||
- Issue #21725: Added support for RFC 6531 (SMTPUTF8) in smtpd.
|
||||
|
||||
- Issue #22176: Update the ctypes module's libffi to v3.1. This release
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue