Skip to content

Commit bb3f5ba

Browse files
committed
Skip normalizing case for path during displaying
Because os.getcwd and os.path.abspath both honors original letter-case, we should not normalize case again when calculating the relative path.
1 parent 38e9bbe commit bb3f5ba

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

news/6823.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This change will preserve path in it's original letter-case during displaying.

src/pip/_internal/utils/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def rmtree_errorhandler(
190190
def display_path(path: str) -> str:
191191
"""Gives the display value for a given path, making it relative to cwd
192192
if possible."""
193-
path = os.path.normcase(os.path.abspath(path))
193+
path = os.path.abspath(path)
194194
if path.startswith(os.getcwd() + os.path.sep):
195195
path = "." + path[len(os.getcwd()) :]
196196
return path

0 commit comments

Comments
 (0)