Subject: Re: bug#13447: ln "" foo gives misleading error message

From: Paul Eggert <[email-masked]>
Date: Wed, 16 Jan 2013 09:58:20 -0800

On 01/16/13 03:07, Joerg Schilling wrote:
> If the symlink target is to be treated as a list of path name components, 
> I would expect ENOENT with an attempt to open() or stat() "a/".
> 
> If the symlink target is treated as a string that is concatenated to the 
> previous path, Solaris could be seen as correct.

Except that Solaris also treats the symlink as "." even if there is
no previous path.  For example, on Solaris 11:

$ ln -s '' empty
$ ls -l empty
lrwxrwxrwx   1 eggert   faculty        0 Jan 16 09:56 empty -> 
$ cat empty
cat: input error on empty: Is a directory
$ cat ''
cat: cannot open : No such file or directory

This is an undesirable inconsistency, and it's hard to see how
any user would want this behavior.