mercurial/pathutil.py
changeset 38593 21be76e07148
parent 36678 d3b893ec5f08
child 43076 2372284d9457
--- a/mercurial/pathutil.py	Sun Jul 08 16:21:26 2018 +0900
+++ b/mercurial/pathutil.py	Sun Jul 08 16:31:14 2018 +0900
@@ -226,7 +226,7 @@
             if cwd != root:
                 canonpath(root, root, myname, auditor)
                 relpath = util.pathto(root, cwd, '')
-                if relpath[-1] == pycompat.ossep:
+                if relpath.endswith(pycompat.ossep):
                     relpath = relpath[:-1]
                 hint = (_("consider using '--cwd %s'") % relpath)
         except error.Abort: