Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/common.py @ 36676:052351e3e1cd
py3: make os.pardir a bytes
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 03 Mar 2018 12:34:35 -0500 |
parents | f8ea6988a5fb |
children | 6585ac350fd9 |
line wrap: on
line diff
--- a/mercurial/hgweb/common.py Sat Mar 03 14:21:47 2018 -0500 +++ b/mercurial/hgweb/common.py Sat Mar 03 12:34:35 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, os.pardir) or + if (part in ('', os.curdir, pycompat.ospardir) or pycompat.ossep in part or pycompat.osaltsep is not None and pycompat.osaltsep in part): return False