Skip to content

Commit

Permalink
check asset paths before opening tar file
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Aug 18, 2023
1 parent 271bf02 commit 8f4b770
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qgispluginci/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@ def create_archive(
# https://stackoverflow.com/a/48462950/1548052
tt.add(file)
# Add assets
with tarfile.open(top_tar_file, mode="a") as tt:
for asset_path in asset_paths:
tt.add(asset_path)
if len(asset_paths) > 0:
with tarfile.open(top_tar_file, mode="a") as tt:
for asset_path in asset_paths:
tt.add(asset_path)

# converting to ZIP
# why using TAR before? because it provides the prefix and makes things easier
Expand Down

0 comments on commit 8f4b770

Please sign in to comment.