Skip to content

Commit 3491ad9

Browse files
gh-129350: remove potential bad copy paste
1 parent d8e16ef commit 3491ad9

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

Lib/glob.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,25 @@ def _iglob(pathname, root_dir, dir_fd, recursive, dironly,
7171
else:
7272
# Patterns ending with a slash should match only directories
7373
if _isdir(_join(root_dir, dirname), dir_fd):
74-
yield pathname
74+
yield dirname
7575
return
7676
if not dirname:
7777
if recursive and _isrecursive(basename):
78-
yield from _glob2(root_dir, basename, dir_fd, dironly,
79-
include_hidden=include_hidden)
78+
yield from _glob2(
79+
root_dir, basename, dir_fd, dironly, include_hidden=include_hidden
80+
)
8081
else:
81-
yield from _glob1(root_dir, basename, dir_fd, dironly,
82-
include_hidden=include_hidden)
82+
yield from _glob1(
83+
root_dir, basename, dir_fd, dironly, include_hidden=include_hidden
84+
)
8385
return
8486
# `os.path.split()` returns the argument itself as a dirname if it is a
8587
# drive or UNC path. Prevent an infinite recursion if a drive or UNC path
8688
# contains magic characters (i.e. r'\\?\C:').
8789
if dirname != pathname and has_magic(dirname):
88-
dirs = _iglob(dirname, root_dir, dir_fd, recursive, True,
89-
include_hidden=include_hidden)
90+
dirs = _iglob(
91+
dirname, root_dir, dir_fd, recursive, True, include_hidden=include_hidden
92+
)
9093
else:
9194
dirs = [dirname]
9295
if has_magic(basename):

0 commit comments

Comments
 (0)