Run full sync after a sync with errors
Currently, the following might happen with a synchronized library (WebDAV):
- The app requests the top level etags for the year folders.
- For any changed folder, we decent into that one and sync it as well (i.e. first months level, than the items inside these folders).
- Problems may arise from the following:
- Sync of the top level directory might succeed. This will cause the local DB to be updated with the latest etags.
- When descending into the sub-folders, a (non-fatal) sync error might occur. This might happen e.g. when network connectivity is lost.
- Upon subsequent syncs, we won't decent into sub-folders once more, because sync stops at the top-most directory.
For this reason, we would better do the following:
- If, during a sync, an issue occurs, set a flag for the next sync run.
- When starting a sync, check this flag and - if it is set - run a full sync again to ensure we pull everything from the server.
Alternatively, we could only update the etags in the DB after the sync in the sub-folders succeeds.