if list2 does not start with list1, we can't really check and return 0

def compare_parts(list1, list2):
    """
    if list2 does not start with list1, we can't really check and return 0
    """

    for i, item in enumerate(list1):
        if item != list2[i]:
            return 0
    if len(list2) > len(list1):
        return ISDIR
    else:
        return ISFILE