diff options
-rw-r--r-- | cloud_mdir_sync/main.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cloud_mdir_sync/main.py b/cloud_mdir_sync/main.py index 89daa11..db33af8 100644 --- a/cloud_mdir_sync/main.py +++ b/cloud_mdir_sync/main.py @@ -74,13 +74,15 @@ async def synchronize_mail(cfg: config.Config): for mbox in cfg.all_mboxes() if mbox.need_update)) - nmsgs = route_cloud_messages(cfg) if msgs is not None: await update_cloud_from_local(cfg, msgs) - elif cfg.args.OFFLINE: - await update_cloud_from_local(cfg, - nmsgs, - offline_mode=True) + nmsgs = route_cloud_messages(cfg) + else: + nmsgs = route_cloud_messages(cfg) + if cfg.args.OFFLINE: + await update_cloud_from_local(cfg, + nmsgs, + offline_mode=True) force_local_to_cloud(cfg, nmsgs) msgs = nmsgs |