Handle folder name duplicates when adding external storages

Issue description
I’ve added an external storage named “Movies” (via SMB) as admin to a Nextcloud with several users. Unfortunately, one of the users already had a folder “Movies” in his cloud. Result: The external folder overlaid the other one and the users original folder was not visibly in his folder list anymore.
Of course, renaming the external folder to “Externalmovies” solved the problem. But on larger instances with many users it becomes inconvenient to check all user accounts for possible duplicate folder names before adding external storages.

Suggestions for possible solutions

  • show an error message / warning, when the admin tries to add external storages with folder names that already exist in user accounts
  • automatically rename duplicates (e.g. “Movies” --> “Movies (2)”)

Thanks in advance! You are doing a great job!
Markus

Hi, I have this problem that you mention, had a smb (NAS) configured, delete it and create another with the same name to a different server, and now the smb folders are duplicated.