changeset 34201:310c151a0705

posix: use slicing to grab a single byte out of a bytes in HFS+ normcase code
author Augie Fackler <raf@durin42.com>
date Fri, 15 Sep 2017 19:44:05 -0400
parents 112f118ecb00
children d47749807464
files mercurial/posix.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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