Skip to content

Commit

Permalink
Normalize case before comparing (#4770)
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored and pfmoore committed Oct 7, 2017
1 parent d8e6654 commit c81e8ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pip/_internal/req/req_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def compress_for_output_listing(paths):
if fname.endswith(".pyc"):
continue

file_ = os.path.join(dirpath, fname)
file_ = os.path.normcase(os.path.join(dirpath, fname))
if os.path.isfile(file_) and file_ not in files:
# We are skipping this file. Add it to the set.
will_skip.add(file_)
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_req_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def test_compressed_listing(tmpdir):
def in_tmpdir(paths):
li = []
for path in paths:
li.append(
str(os.path.join(tmpdir, path.replace("/", os.path.sep)))
)
li.append(str(os.path.normcase(
os.path.join(tmpdir, path.replace("/", os.path.sep))
)))
return li

sample = in_tmpdir([
Expand Down

0 comments on commit c81e8ac

Please sign in to comment.