That’s most likely Nextcloud desktop’s fault though. One time I was syncing my games folder and it had an error downloading some files and when I clicked retry sync it apparently decided that I had deleted the games folder so it just immediately removed the entire thing from my Nextcloud server. Didn’t even send it to trash despite me having the option to put deleted files in trash enabled.
Ya I just went through this myself, long story short, never sync your home dir to nextcloud via the desktop client. Do the sub folders one at a time.
That’s most likely Nextcloud desktop’s fault though. One time I was syncing my games folder and it had an error downloading some files and when I clicked retry sync it apparently decided that I had deleted the games folder so it just immediately removed the entire thing from my Nextcloud server. Didn’t even send it to trash despite me having the option to put deleted files in trash enabled.