py3: replace bytes[n] with slicing in checkwinfilename()
authorYuya Nishihara <yuya@tcha.org>
Wed, 27 Sep 2017 19:13:43 +0900
changeset 34361 7508a7dc95c1
parent 34360 f435097d13c9
child 34362 b76937fafe8a
py3: replace bytes[n] with slicing in checkwinfilename()
mercurial/util.py
--- 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