a �DOgG �@sdd�Zdd�ZdS)cCs�ddl}ddl}|�dd�}d|vr\|dd�dkr@|dd�}|�d�}|j�d�|��S|�d�}t|�dks�|dd |jvr�d |}t |��|dd � �}|d �d�}|d}|D]}|r�|d|j�|�}q�|� d�r�|� d�r�|d7}|S) N��:�|�z////��/�\�����z Bad URL: �) �string� urllib.parse�replace�split�parse�unquote�join�len� ascii_letters�OSError�upper�endswith)�urlr �urllib� components�comp�error�drive�path�r�"/usr/lib64/python3.9/nturl2path.py� url2pathnames(     rcCs4ddl}|dd�dkrf|dd�}|dd���dkrJd|dd�}n|dd�dkrftd |��d|vr�|dd�d kr�d |}|�d�}|j�d �|��S|jddd �}t|�dks�t|d�dkr�d |}t|��|j�|d���}|d�d�}d |d}|D] }|�r|d |j�|�}�q|S)Nrrz\\?\zUNC\rr rrz Bad path: z\\r)�maxsplitz///)r rrr r�quoterr)�prrrrrrrrr� pathname2url-s.    r#N)rr#rrrr�s%