Ezio Melotti added the comment: - if basename == '': + if len(basename) == 0:
This should be "if not basename:" - if tail == curdir: + cdir = curdir + if isinstance(tail, bytes): + cdir = bytes(curdir, 'ASCII') + if tail == cdir: This will raise an error if curdir is a non-ascii str, so, unless the same error was already raised later in the code, this is backward incompatible. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com