posix: use slicing to grab a single byte out of a bytes in HFS+ normcase code
authorAugie Fackler <raf@durin42.com>
Fri, 15 Sep 2017 19:44:05 -0400
changeset 34201 310c151a0705
parent 34200 112f118ecb00
child 34202 d47749807464
posix: use slicing to grab a single byte out of a bytes in HFS+ normcase code
mercurial/posix.py
--- a/mercurial/posix.py	Fri Sep 15 19:43:32 2017 -0400
+++ b/mercurial/posix.py	Fri Sep 15 19:44:05 2017 -0400
@@ -372,7 +372,7 @@
                     c = encoding.getutf8char(path, pos)
                     pos += len(c)
                 except ValueError:
-                    c = '%%%02X' % ord(path[pos])
+                    c = '%%%02X' % ord(path[pos:pos + 1])
                     pos += 1
                 s += c