pgcontents/api_utils.py
def normalize_api_path(api_path):
    """
    Resolve paths with '..' to normalized paths, raising an error if the final
    result is outside root.
    """
    normalized = posixpath.normpath(api_path.strip('/'))
    if normalized == '.':
        normalized = ''
    elif normalized.startswith('..'):
        raise PathOutsideRoot(normalized)
    return normalized
def normalize_api_path(api_path):
    """
    Resolve paths with '..' to normalized paths, raising an error if the final
    result is outside root.
    """
    normalized = posixpath.normpath(api_path.strip('/'))
    if normalized == '.':
        normalized = ''
    elif normalized.startswith('..'):
        raise PathOutsideRoot(normalized)
    return normalized
Resolve paths with '..' to normalized paths, raising an error if the final
    result is outside root.