author | Matt Mackall <mpm@selenic.com> |
Sat, 12 Dec 2015 21:36:21 -0600 | |
changeset 27380 | c7129ed280b8 |
parent 27379 | 2278870bb997 |
child 27381 | 988367ac2a2a |
--- a/mercurial/posix.py Sun Dec 13 11:19:55 2015 -0800 +++ b/mercurial/posix.py Sat Dec 12 21:36:21 2015 -0600 @@ -270,13 +270,13 @@ # OS X percent-encodes any bytes that aren't valid utf-8 s = '' pos = 0 - l = len(s) + l = len(path) while pos < l: try: c = encoding.getutf8char(path, pos) pos += len(c) except ValueError: - c = '%%%%02X' % path[pos] + c = '%%%02X' % ord(path[pos]) pos += 1 s += c