jgunthorpe / cloud_mdir_sync

Download mailboxes from the cloud into a local MailDir
Other
16 stars 9 forks source link

assertion failure for deleted message #7

Closed us91 closed 2 years ago

us91 commented 2 years ago

In office365.py, When a message is deleted at local folder, and before the deletion is propagated to the cloud, the program checks to assert os.stat(os.path.join(self.msgdb.hashes_dir, ch)).st_nlink == 1. This works well by default. However, sometime, I make a copy of the message in a different folder, and the number of links is more than 1 after the message is deleted from the synced local folder. In this case, the assertion fails, and the program aborts abnormally. The desired behavior is to skip the assertion, and trust the local folder for the deletion.

jgunthorpe commented 2 years ago

It is debugging code that can be deleted, please send a PR

us91 commented 2 years ago

A PR was created, and merged with the main branch. So this issue is fully resolved.