HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/__pycache__/_os.cpython-310.pyc
o

�h	�@s`ddlZddlZddlmZmZmZmZmZddlm	Z	ddl
mZdd�Zdd�Z
d	d
�ZdS)�N)�abspath�dirname�join�normcase�sep)�Path)�SuspiciousFileOperationcGsjtt|g|�R��}t|�}t|��t|t��s3t|�t|�kr3tt|��t|�kr3td�||���|S)z�
    Join one or more path components to the base path component intelligently.
    Return a normalized, absolute version of the final path.

    Raise ValueError if the final path isn't located inside of the base path
    component.
    zGThe joined path ({}) is located outside of the base path component ({}))rrr�
startswithrrr�format)�base�paths�
final_path�	base_path�r�F/usr/local/CyberPanel/lib/python3.10/site-packages/django/utils/_os.py�	safe_join	s	��rc
Cs�t���5}tj�|d�}tj�|d�}t�|�z
t�||�d}Wn
ttfy/d}Ynw|Wd�S1s<wYdS)z�
    Return whether or not creating symlinks are supported in the host platform
    and/or if they are allowed to be created (e.g. on Windows it requires admin
    permissions).
    �original�symlinkTFN)	�tempfile�TemporaryDirectory�os�pathr�makedirsr�OSError�NotImplementedError)�temp_dir�
original_path�symlink_path�	supportedrrr�symlinks_supported&s

�$�rcCs2t|t�r|St|t�stdt|�j��t|�S)z@Convert value to a pathlib.Path instance, if not already a Path.zInvalid path type: %s)�
isinstancer�str�	TypeError�type�__name__)�valuerrr�to_path8s


r&)rr�os.pathrrrrr�pathlibr�django.core.exceptionsrrrr&rrrr�<module>s