Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/common.py @ 36677:6585ac350fd9
py3: make os.curdir a bytes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 03 Mar 2018 12:36:05 -0500 |
parents | 052351e3e1cd |
children | ffa3026d4196 |
line wrap: on
line diff
--- a/mercurial/hgweb/common.py Sat Mar 03 12:34:35 2018 -0500 +++ b/mercurial/hgweb/common.py Sat Mar 03 12:36:05 2018 -0500 @@ -138,7 +138,7 @@ """Determine if a path is safe to use for filesystem access.""" parts = path.split('/') for part in parts: - if (part in ('', os.curdir, pycompat.ospardir) or + if (part in ('', pycompat.oscurdir, pycompat.ospardir) or pycompat.ossep in part or pycompat.osaltsep is not None and pycompat.osaltsep in part): return False