Add eml extension
This commit is contained in:
parent
055660ff6a
commit
f165882786
1 changed files with 4 additions and 2 deletions
|
@ -159,7 +159,8 @@ class BackupImap:
|
|||
subject = f"{original_subject}_{counter}"
|
||||
message_path = os.path.join(
|
||||
mailbox_path,
|
||||
subject
|
||||
subject,
|
||||
'.eml'
|
||||
)
|
||||
counter += 1
|
||||
try:
|
||||
|
@ -176,7 +177,8 @@ class BackupImap:
|
|||
if error.errno == 36: # File name too long
|
||||
message_path = os.path.join(
|
||||
mailbox_path,
|
||||
f"message_uid_{message_uid.decode()}"
|
||||
f"message_uid_{message_uid.decode()}",
|
||||
'.eml'
|
||||
)
|
||||
with open(message_path, 'wb') as file_pointer:
|
||||
file_pointer.write(data)
|
||||
|
|
Loading…
Reference in a new issue