layout of panels tweaked

This commit is contained in:
Tim Bendt
2025-05-04 14:50:58 -06:00
parent 08eb4ee0cf
commit b26674ff4e
9 changed files with 201 additions and 54 deletions

View File

@@ -97,6 +97,9 @@ def synchronize_maildir(maildir_path, headers):
)
if response.status_code != 201: # 201 Created indicates success
print(f"Failed to move message to 'Archive': {message_id}, {response.status_code}, {response.text}")
if response.status_code == 404:
os.remove(filepath) # Remove the file from local archive if not found on server
# Save the current sync timestamp
save_sync_timestamp()
@@ -311,7 +314,7 @@ new_files = set(glob.glob(os.path.join(new_dir, '*.eml')))
cur_files = set(glob.glob(os.path.join(cur_dir, '*.eml')))
for filename in Set.union(cur_files, new_files):
message_id = filename.split('.')[0] # Extract the Message-ID from the filename
message_id = filename.split('.')[0].split('/')[-1] # Extract the Message-ID from the filename
if (message_id not in inbox_msg_ids):
print(f"Deleting {filename} from inbox")
os.remove(filename)