OwlCyberSecurity - MANAGER
Edit File: _os.cpython-39.pyc
a kH�f � @ s` d dl Z d dlZd dlmZmZmZmZmZ d dlm Z d dl mZ dd� Zdd� Z d d � ZdS )� N)�abspath�dirname�join�normcase�sep)�Path)�SuspiciousFileOperationc G sj t t| g|�R � �}t | �}t|��t|t ��sft|�t|�krftt|��t|�krftd�||���|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 ({}))r r r � startswithr r r �format)�base�pathsZ final_path� base_path� r �R/home/gouroczh/virtualenv/test/3.9/lib/python3.9/site-packages/django/utils/_os.py� safe_join s �����r c C s� t �� �j} tj�| d�}tj�| d�}t�|� zt�||� d}W n ttfy^ d}Y n0 |W d � S 1 sx0 Y dS )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_dirZ original_pathZsymlink_path� supportedr r r �symlinks_supported&