I was trying to copy my some of my config folders to another system which was mounted with root privileges using dired. I opened both surrounding folders using /sudo::/...
and tried to copy my files from one to the other, putting again the tramp
-sudo-prefix into the copy path and was asked whether to overwrite the target folder, but when I said yes, it still told me copying failed because the folders already existed. I also tried using the dired-toggle-sudo
-package, but it didn't work either. If I delete the folders to be overwritten before, I can copy the folders to the destination, but this is quite cumbersome. Is there a way I can overwrite the files without having to delete them first?
Here is an example of the output:
Overwrite ‘/sudo:root@alex:/run/media/alex/0c989fa2-cf7a-4238-b66d-4505fbac04f7/home/alex/Documents’? [Type ynlq! or C-h] y
File already exists: /sudo:root@alex:/run/media/alex/0c989fa2-cf7a-4238-b66d-4505fbac04f7/home/alex/Documents
Copy: ‘/sudo:root@alex:/home/alex/Documents’ to ‘/sudo:root@alex:/run/media/alex/0c989fa2-cf7a-4238-b66d-4505fbac04f7/home/alex/’ failed:
(file-already-exists /sudo:root@alex:/run/media/alex/0c989fa2-cf7a-4238-b66d-4505fbac04f7/home/alex/Documents)
I'm using Emacs 28.2 and Tramp 2.5.3.28.2.