def path2list(path):
    """
    Maybe convert a '/' separated string into a list.
    """
    if isinstance(path, str):
        path = path.split('/')
        if path[-1] == '':
            path.pop()
        return path
    return list(path)
