Skip to content

Commit 48093d5

Browse files
committed
fix: filenames with periods
1 parent 58cf2b2 commit 48093d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cdk/data_ingestion/src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def parse_s3_file_path(document_key):
6767
# Assuming the file path is of the format: {category_id}/{document_name}.{document_type}
6868
try:
6969
category_id, documentname_with_ext = document_key.split('/')
70-
document_name, document_type = documentname_with_ext.split('.')
70+
document_name, document_type = documentname_with_ext.rsplit('.', 1) # Split on the last period
7171
return category_id, document_name, document_type
7272
except Exception as e:
7373
logger.error(f"Error parsing S3 document path: {e}")

0 commit comments

Comments
 (0)