on first sync cycle the server has precedence
AFAIK if you setup a new account desktop client clearly tells you to new a new empty directory - the user still may choose directory with existing data to speed up a sync - but in case server is empty this results in data loss as you described. I don’t think more can be done to prevent issues.