← Back
Editing: util.cpython-38.pyc
U �]� � @ sN d Z ddlZddlmZ ddlmZ ddlmZ e�e �Z dd� Zdd � ZdS ) zPlugin utilities.� N)�util)�os)�STANDARD_BINARY_DIRSc C sB t j�| �}g }|r>|�|� t j�|�\}}||d krq>q|S )a� Retrieves all possible path prefixes of a path, in descending order of length. For instance, (linux) /a/b/c returns ['/a/b/c', '/a/b', '/a', '/'] (windows) C:\a\b\c returns ['C:\a\b\c', 'C:\a\b', 'C:\a', 'C:'] :param str path: the path to break into prefixes :returns: all possible path prefixes of given path in descending order :rtype: `list` of `str` ���)r �path�normpath�append�split)r �prefix�prefixes�_� r �6/usr/lib/python3/dist-packages/certbot/plugins/util.py�get_prefixes s r c C s� t jd }g }tD ]$}||kr|t j| 7 }|�|� qt|�r`t�d| t j�|�� |t jd<