OfflineIMAP / offlineimap3

Read/sync your IMAP mailboxes (python3)
Other
455 stars 64 forks source link

Do not try to create existing folders #178

Closed roboshim closed 3 months ago

roboshim commented 10 months ago

Hello,

during my sync I have found a few problems and I have created a few updates in the code.

This patch updates code of creating folders and folder structure. Some servers close connection are a few attempts to create already present folders. This update checks if the folder already exists and do not try to create it. And if the folder doesn't exist, it will be created and then the folder list will be updated for the next folder creating.

Please, review this update if it's correct and please merge it if you find it useful. Otherwise update code or just close the PR.

Thank you.

Regards, Robo.

roboshim commented 5 months ago

there was a bug - it cannot refresh folders because it cannot acquire connection, so it has to refresh folders after release connection