Skip to content

Commit 53313fc

Browse files
authored
fix: Delete download path after scanning finished (#1394)
1 parent 4ebe4d1 commit 53313fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

assets/lambda/code/scan/lambda.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ def delete(download_path, input_key=None):
366366
shutil.rmtree(obj)
367367
else:
368368
os.remove(obj)
369-
369+
# Remove the download_path folder itself
370+
shutil.rmtree(download_path)
370371

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

0 commit comments

Comments
 (0)