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

This commit is contained in:
Antoine Pitrou 2012-12-16 16:03:57 +01:00
commit feb318a37a
2 changed files with 29 additions and 6 deletions

View file

@ -62,7 +62,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):