Skip to content

Commit

Permalink
test for size of the file before skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
SiQube committed Nov 17, 2024
1 parent 7b0b95e commit 75b0b34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pymovements/utils/archives.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ def _extract_tar(
with tarfile.open(source_path, f'r:{compression[1:]}' if compression else 'r') as archive:
for member in archive.getnames():
if (
os.path.exists(os.path.join(destination_path, member)) and
member[-4:] not in _ARCHIVE_EXTRACTORS
os.path.exists(os.path.join(destination_path, member)) and
member[-4:] not in _ARCHIVE_EXTRACTORS and
tarfile.TarInfo(os.path.join(destination_path, member)).size > 0
):
continue

Check warning on line 160 in src/pymovements/utils/archives.py

View check run for this annotation

Codecov / codecov/patch

src/pymovements/utils/archives.py#L160

Added line #L160 was not covered by tests
if sys.version_info < (3, 12): # pragma: <3.12 cover
Expand Down

0 comments on commit 75b0b34

Please sign in to comment.