From 722aeb3230a9bdc361b0baf90719a280e9cb6fe8 Mon Sep 17 00:00:00 2001 From: Dragon Dave McKee Date: Wed, 24 Apr 2024 10:36:21 +0100 Subject: [PATCH] Don't change the local filename, only the stored filename --- ds-caselaw-ingester/lambda_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ds-caselaw-ingester/lambda_function.py b/ds-caselaw-ingester/lambda_function.py index 3c8890f..f6f5f9c 100644 --- a/ds-caselaw-ingester/lambda_function.py +++ b/ds-caselaw-ingester/lambda_function.py @@ -524,9 +524,9 @@ def process_message(message): filename if docx_filename else modify_filename(filename, "_nodocx") ) store_file( - open(modified_targz_filename, mode="rb"), + open(filename, mode="rb"), uri, - os.path.basename(filename), + os.path.basename(modified_targz_filename), s3_client, ) print(f"saved tar.gz as {modified_targz_filename!r}")