Sometimes a sync deletes all files in a library

As reported on GitHub:

It can happen that a sync deleted an entire library. We should check the sync code if there's something that could cause this. If no obvious bug is found, we should consider adding some safeguards (such as retrieving the entire list of files from the server again).

Edited by Martin Hoeher