mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
fix diff_states prefix matching again
This commit is contained in:
parent
0c2309c3c8
commit
ef728b44e9
|
@ -348,7 +348,8 @@ def diff_states(start, end, ignore=None):
|
|||
def prefix_match(path, prefix):
|
||||
if path == prefix:
|
||||
return True
|
||||
return path.startswith(prefix) and path[len(prefix)] == os.path.sep
|
||||
prefix = prefix.rstrip(os.path.sep) + os.path.sep
|
||||
return path.startswith(prefix)
|
||||
|
||||
start_keys = set([k for k in start.keys()
|
||||
if not any([prefix_match(k, i) for i in ignore])])
|
||||
|
|
Loading…
Reference in a new issue