Closed pfmoore closed 5 days ago
Doh, never mind. This is causing a load of test failures. I still think this looks wrong, but I don't have the time to dig any deeper right now, and it's not causing any actual issues, so I'm just going to close this PR.
When passed a bare filename,
pip._internal.utils.unpacking.split_leading_dir
returns a 2-element list with the first part being the filename supplied. This is backwards - the first part is meant to be the leading directory.This doesn't currently trigger a bug because
split_leading_dir
isn't ever called in a situation where the argument is a bare filename (except inhas_leading_dir
, where the bug is extremely unlikely to give an incorrect result). But it's worth fixing in case this ever changes.