fix extension
This commit is contained in:
parent
f165882786
commit
9675962c17
1 changed files with 2 additions and 4 deletions
|
@ -159,8 +159,7 @@ class BackupImap:
|
|||
subject = f"{original_subject}_{counter}"
|
||||
message_path = os.path.join(
|
||||
mailbox_path,
|
||||
subject,
|
||||
'.eml'
|
||||
f"{subject}.eml"
|
||||
)
|
||||
counter += 1
|
||||
try:
|
||||
|
@ -177,8 +176,7 @@ class BackupImap:
|
|||
if error.errno == 36: # File name too long
|
||||
message_path = os.path.join(
|
||||
mailbox_path,
|
||||
f"message_uid_{message_uid.decode()}",
|
||||
'.eml'
|
||||
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