Skip to content

Commit

Permalink
fix: Delete download path after scanning finished
Browse files Browse the repository at this point in the history
  • Loading branch information
vumdao committed Jan 31, 2025
1 parent 5151595 commit 082a0ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assets/lambda/code/scan/lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@ def delete(download_path, input_key=None):
shutil.rmtree(obj)
else:
os.remove(obj)

# Remove the download_path folder itself
shutil.rmtree(download_path)

def report_failure(input_bucket, input_key, download_path, message):
"""Set the S3 object tag to ERROR if scan function fails"""
Expand Down

0 comments on commit 082a0ae

Please sign in to comment.