Subject: Re: bug#14116: [PATCH] ln: allow to overwrite relative symlink

From: Pádraig Brady <[email-masked]>
Date: Sun, 07 Apr 2013 11:36:31 +0100

On 04/07/2013 08:20 AM, Linda Walsh wrote:
> 
> 
> Rémy Lefevre wrote:
> [>> Pádraig Brady wrote:
>>> Doing that though breaks `ln -sr target1 target2 dir` where dir is a symlink.
> ]
>> But could you provide me an example where the final component of the link
>> should be resolved ?
> ---
> 	What happens if 'dir' is a symlink, "-n" is used, and
> '/' (or '/.') is appended to "dir" in the above example?
> 
> 	Would that force 'dir' to be resolved, on the basis that
> '/' would be the final component.  Some, might argue that it's a separator
> and not a component, but, historically, the three haven't given
> synonymous semantics.

Yes that does force 'dir' to be resolved,
which is consistent with the non --relative case
where the symlink is resolved to a dir
when both -n and a trailing '/' are used.

  ln -sn target1 target2 dir/

thanks,
Pádraig.