📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-27 14:24:51
📂
/
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pip
/
_internal
/
utils
/
__pycache__
✏️
Editing: unpacking.cpython-312.pyc
� Jr*j5 � �� � d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl mZ ddl mZ ddl mZ ddlmZmZmZmZ ddlmZ ej, e� Zeez Z ddlZeez Z ddlZeez Zdd�Zdd�Zdd �Z dd�Z!dd�Z"dd�Z#dd�Z$ddd�Z%dd�Z&d d�Z' d!d�Z( d" d#d�Z)y# e$ r ej9 d � Y �gw xY w# e$ r ej9 d � Y �yw xY w)$zUtilities related archives.� )�annotationsN)�Iterable)�ZipInfo)�InstallationError)�BZ2_EXTENSIONS�TAR_EXTENSIONS� XZ_EXTENSIONS�ZIP_EXTENSIONS)� ensure_dirzbz2 module is not availablezlzma module is not availablec �Z � t j d� } t j | � | S )zBGet the current umask which involves having to set it temporarily.r )�os�umask)�masks �L/opt/hc_python/lib/python3.12/site-packages/pip/_internal/utils/unpacking.py� current_umaskr - s � � �8�8�A�;�D��H�H�T�N��K� c � � | j d� j d� } d| v r=d| v r#| j d� | j d� k sd| vr| j dd� S d| v r| j dd� S | dgS )N�/�\� � )�lstrip�find�split��paths r �split_leading_dirr 4 sz � ��;�;�s��"�"�4�(�D� �d�{� ���$�)�)�C�.�4�9�9�T�?�:�t�4�?O��z�z�#�q�!�!� ����z�z�$��"�"��b�z�r c �R � d}| D ] }t |� \ }}|s y|�|}�||k7 s� y y)zyReturns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)NFT)r )�paths� common_prefixr �prefix�rests r �has_leading_dirr# @ sB � � �M���(��.������ � "�"�M� �}� $�� � r c �� � t j j | � }t j j |� }||k( xs" |j |t j z � S )z� Return true if the absolute path of target is within the directory (including when target is equal to the directory). )r r �abspath� startswith�sep)� directory�target� abs_directory� abs_targets r �is_within_directoryr, O sO � � �G�G�O�O�I�.�M�������(�J���&�W�*�*?�*?� �PR�PV�PV�@V�*W�Wr c �$ � dt � z dz S )Ni� �I )r � r r �!_get_default_mode_plus_executabler0 Z s � ��M�O�#�#�e�+�+r c �@ � t j | t � � y)zx Make file present at path have execute for user/group/world (chmod +x) is no-op on windows per python docs N)r �chmodr0 r s r �2set_extracted_file_to_default_mode_plus_executabler3 ^ s � � �H�H�T�4�6�7r c �r � | j dz }t |xr t j |� xr |dz � S )N� r. )� external_attr�bool�stat�S_ISREG)�info�modes r �zip_item_is_executabler<