[issue16626] Infinite recursion in glob.glob('*:') on Windows
Serhiy Storchaka
report at bugs.python.org
Fri Dec 14 19:21:07 CET 2012
Serhiy Storchaka added the comment:
> Patch contains unrelated changes.
Sorry, my fault.
Here is a cleaned patch.
----------
Added file: http://bugs.python.org/file28314/glob_magic_in_drive.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16626>
_______________________________________
-------------- next part --------------
diff -r ece75a3b942c Lib/glob.py
--- a/Lib/glob.py Wed Dec 05 17:59:29 2012 +0200
+++ b/Lib/glob.py Thu Dec 06 13:07:58 2012 +0200
@@ -28,7 +28,7 @@
if not dirname:
yield from glob1(None, basename)
return
- if has_magic(dirname):
+ if dirname != pathname and has_magic(dirname):
dirs = iglob(dirname)
else:
dirs = [dirname]
More information about the Python-bugs-list
mailing list