equal
deleted
inserted
replaced
581 # FIXME: Ideally we'd never get to this point if this is the case - we'd |
581 # FIXME: Ideally we'd never get to this point if this is the case - we'd |
582 # recognize ourselves as an 'always' matcher and skip this. |
582 # recognize ourselves as an 'always' matcher and skip this. |
583 if b'' in prefix_set: |
583 if b'' in prefix_set: |
584 return True |
584 return True |
585 |
585 |
586 if pycompat.ispy3: |
586 sl = ord(b'/') |
587 sl = ord(b'/') |
|
588 else: |
|
589 sl = '/' |
|
590 |
587 |
591 # We already checked that path isn't in prefix_set exactly, so |
588 # We already checked that path isn't in prefix_set exactly, so |
592 # `path[len(pf)] should never raise IndexError. |
589 # `path[len(pf)] should never raise IndexError. |
593 return any(path.startswith(pf) and path[len(pf)] == sl for pf in prefix_set) |
590 return any(path.startswith(pf) and path[len(pf)] == sl for pf in prefix_set) |
594 |
591 |