# HG changeset patch
# User Augie Fackler <r...@durin42.com>
# Date 1505519045 14400
#      Fri Sep 15 19:44:05 2017 -0400
# Node ID 8a1f211ac2afb3e49a15def443b7f556ee3c0d47
# Parent  33c529f19fdf5dbecc7e2853e8eabaac4cc347e2
posix: use slicing to grab a single byte out of a bytes in HFS+ normcase code

diff --git a/mercurial/posix.py b/mercurial/posix.py
--- a/mercurial/posix.py
+++ b/mercurial/posix.py
@@ -372,7 +372,7 @@ if pycompat.sysplatform == 'darwin':
                     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
 
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to