ȏ4J d Z ddlZddlZddlZddlZddlmZmZ ddlm Z ej
e Ze fde
dedee
fd Zdde
de
defd
Zde
de
de
fdZ G d d ZdS )u
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Copyright © 2019 Cloud Linux Software Inc.
This software is also available under ImunifyAV commercial license,
see
N)IteratorOptional )
MAX_FILE_SIZE
target_dirmax_sizereturnc # | K t j | D ]\ }}}|D ]}t j || } t j | |k r"t j || V i# t
$ r&}t d|| Y d }~d }~ww xY wd S )Nz+Error occurred while processing file %s: %s)oswalkpathjoingetsize Exceptionloggerwarning)r r rootdirsfilesfiler
es S/opt/imunify360/venv/lib/python3.11/site-packages/imav/patchman/fs_scanner/utils.pydir_traverse_generatorr ! s WZ00 dE D7<<d++D
7??4((H44',,tT22222
A4
s AB
B8B33B8/abs_pathroot_dirc | r"t j | |pd nd}| t j t j fdt
t D S )Nr c ^ g | ])}t j |d *S N)r sepr ).0i
path_partss r
z/all_possible_relative_paths..6 s/ HHHABFKK
122''HHH )r r
relpathstripr! splitrangelen)r r rel_pathr$ s @r all_possible_relative_pathsr- 0 st >FMrwxS9992H''--bf55JHHHHs:1G1GHHHHr&