Subject: bug#10897: copy-directory create new directory when copying a symlink

From: Eli Zaretskii <[email-masked]>
Date: Sun, 22 Aug 2021 19:47:12 +0300

> From: Michael Albinus <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 22 Aug 2021 16:58:16 +0200
> 
> >> Hmm. Is this something we want also in Tramp?
> >
> > Which part, specifically?
> 
> Copy a symbolic link as-is. Example:
> 
> --8<---------------cut here---------------start------------->8---
> (make-directory "/ssh::/tmp/foo")
> (write-region "baz" nil "/ssh::/tmp/foo/baz")
> (make-symbolic-link "/ssh::/tmp/foo" "/ssh::/tmp/bar")
> (copy-directory "/ssh::/tmp/bar" "/ssh::/tmp/bla")
> --8<---------------cut here---------------end--------------->8---
> 
> Currently, this creates a new directory "/ssh::/tmp/bla", which contains
> the file "baz". If the new user option copy-directory-create-symlink is
> non-nil, this should create the symlink "/ssh::/tmp/bla", pointing to
> "/tmp/foo".

Yes, sure.  We should support that with remote files as much as
possible.