def ensure_trailing_slash(expression):
    """
    Add a trailing slash to rsync source/destination locations.

    :param expression: The rsync source/destination expression (a string).
    :returns: The same expression with exactly one trailing slash.
    """
    if expression:
        # Strip any existing trailing slashes.
        expression = expression.rstrip('/')
        # Add exactly one trailing slash.
        expression += '/'
    return expression