shashbha14 opened a new pull request, #65878:
URL: https://github.com/apache/airflow/pull/65878
Resolves #65870
At present, the method 'ImapHook.download_mail_attachments' silently
overwrites existing files in the event that attachments are re-downloaded using
the same filename.
This PR introduces an 'overwrite: bool = True' optional parameter to
'download_mail_attachments' (and its internal methods 'create_files' and
'_create_file'). If 'False', a suffix is added to the filename ('file.csv' →
'file_1.csv') rather than overwriting.
The default is 'True' for backwards compatibility.
I utilized Claude (claude.ai) as my AI helper on parts of this
implementation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]