def get_view_parent_folder(view):
    """
    Given a view, return the path of the window folder it is in, otherwise
    return nothing.
    """
    file_name = view.file_name()
    if not file_name:
        return None
    try:
        parent_window_folders = view.window().folders()
    except Exception:
        parent_window_folders = []
    for folder in parent_window_folders:
        if folder in file_name:
            return folder
    return None