1
1
Fork 0
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:
Carl Meyer 2010-05-26 00:02:15 -04:00
parent 0c2309c3c8
commit ef728b44e9

View file

@ -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])])