def split_path(path, all_paths):
    """Split path into parent and current folder."""
    idx = path.rfind('/', 0, -1)
    if idx == -1:
        return '', path
    parent, label = path[0:idx + 1], path[idx+1:-1]
    if parent not in all_paths:
        return '', path
    return parent, label