def item_path(item, program):
    """
    More recent versions of Sublime Merge use a recent list that contains state
    for the repository instead of just a path; this determines, based on an
    item and the program in use, what the path inside it is.
    """
    if program == "merge" and isinstance(item, dict):
        return item.get("path")

    return item