changeset 34362:7508a7dc95c1

py3: replace bytes[n] with slicing in checkwinfilename()
author Yuya Nishihara <yuya@tcha.org>
date Wed, 27 Sep 2017 19:13:43 +0900
parents f435097d13c9
children b76937fafe8a
files mercurial/util.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Wed Sep 27 19:11:28 2017 +0900
+++ b/mercurial/util.py	Wed Sep 27 19:13:43 2017 +0900
@@ -1340,7 +1340,7 @@
         if base and base.lower() in _winreservednames:
             return _("filename contains '%s', which is reserved "
                      "on Windows") % base
-        t = n[-1]
+        t = n[-1:]
         if t in '. ' and n not in '..':
             return _("filename ends with '%s', which is not allowed "
                      "on Windows") % t