Issue #16696: fix comparison between bytes and string. Also, improve glob tests.

This commit is contained in:
Antoine Pitrou 2012-12-16 16:03:01 +01:00
parent 3d068b2ecf
commit 5461558d1a
2 changed files with 29 additions and 6 deletions

View file

@ -63,7 +63,7 @@ def glob1(dirname, pattern):
return fnmatch.filter(names, pattern)
def glob0(dirname, basename):
if basename == '':
if not basename:
# `os.path.split()` returns an empty basename for paths ending with a
# directory separator. 'q*x/' should match only directories.
if os.path.isdir(dirname):