https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/trac/upgrades/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/trac/upgrades/__pycache__/db28.cpython-310.pyc
o

�k�`�
�@sHddlZddlmZddlmZmZmZddlm	Z	dd�Z
dd�ZdS)	�N)�
Attachment)�exception_to_unicode�printerr�
unicode_quote)�_c

Csrtj�|jd�}tj�|�sdSt�|�}tj�|j�s"t�|j�|�d�|D]
}t|g|�R�q)t�	tj�|jd��D];\}}}z-t
td�rQt�||j�t
td�rbt
|d�rbt�
||j�t
td�rpt�||j|j�Wq?tyzYq?wztj	|d	d
�D]
\}}}t�|�q�WdSty�}	z|j�d|t|	��ttd|t|	�d
��WYd}	~	dSd}	~	ww)ziMove attachments from the `attachments` directory into `files`, hashing
    the filenames in the process.�attachmentsNzM
        SELECT type, id, filename FROM attachment ORDER BY type, id
        �files�chmod�chflags�st_flags�chownF)�topdownz-Can't delete old attachments directory %s: %sauThe upgrade of attachments was successful, but the old attachments directory:

  %(src_dir)s

couldn't be removed, possibly due to the presence of files that weren't
referenced in the database. The error was:

  %(exception)s

This error can be ignored, but for keeping your environment clean you should
backup any remaining files in that directory and remove it manually.
)�src_dir�	exception)�os�path�join�exists�stat�attachments_dir�makedirs�execute�move_attachment_file�walk�hasattrr	�st_moder
rr�st_uid�st_gid�OSError�rmdir�log�warningrrr)
�env�version�cursor�old_attachments_dir�old_stat�row�dir�dirsr�e�r+�4/usr/lib/python3/dist-packages/trac/upgrades/db28.py�
do_upgradesD

 

�������r-c	Cs�tj�|jd|t|��}|rtj�|t|��}tj�|�}tj�|�rGt�|j|||�}z	t�	||�WdSt
yFttd||d���w|j
�d|||�dS)NrzEUnable to move attachment from:

  %(old_path)s

to:

  %(new_path)s
)�old_path�new_pathz3Can't find file for 'attachment:%s:%s:%s', ignoring)rrrr�normpath�isfiler�	_get_pathr�renamesrrrr r!)r"�parent_realm�	parent_id�filenamer.r/r+r+r,rIs*�
����r)�os.pathr�trac.attachmentr�trac.util.textrrr�trac.util.translationrr-rr+r+r+r,�<module>s
4

https://t.me/RX1948 - 2025