do not upload empty file

This commit is contained in:
Louis Abel 2023-08-01 13:02:31 -07:00
parent b1b4ee4e38
commit cb9165a243
Signed by: label
GPG Key ID: 2A6975660E424560
1 changed files with 2 additions and 0 deletions

View File

@ -147,6 +147,8 @@ class Import:
for file in os.scandir(f'{local_repo_path}/SOURCES'):
full_path = f'{local_repo_path}/SOURCES/{file.name}'
magic = fileutil.get_magic_file(full_path)
if magic.name == 'empty':
continue
if magic.encoding == 'binary':
source_dict[f'SOURCES/{file.name}'] = fileutil.get_checksum(full_path)