[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13447: ln "" foo gives misleading error message
From: |
Bernhard Voelker |
Subject: |
bug#13447: ln "" foo gives misleading error message |
Date: |
Tue, 15 Jan 2013 10:17:22 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 |
On 01/15/2013 09:23 AM, Ken Irving wrote:
> (Previously sent in error to the bug-gnu-utils list.)
>
> I've been using symbolic links in a non-file-related way, e.g., to store
> arbitrary string values, but find that if I try to create a symlink with
> an empty 'target' name, e.g., as 'ln -s "" foo', the error message emitted
> is not really correct.
>
> $ ln -s "" foo
> ln: creating symbolic link `foo' -> `': No such file or directory
> $ ln -sf "" foo
> ln: creating symbolic link `foo' -> `': No such file or directory
>
> A link can be created when no file or directory exists, e.g.,
>
> $ stat x || ln -s x foo && echo ok
> stat: cannot stat `x': No such file or directory
> ok
>
> so it seems that 'No such file or directory' must not be the actual
> reason for the failure. Perhaps something like 'null target name'
> would be more accurate?
>
> I only happened upon this in working on a test script, and have no
> expectation for the operation to succeed.
>
> Thanks
>
> Ken Irving
Thanks for the report, however this particular issue has previously
dicussed:
http://lists.gnu.org/archive/html/coreutils/2012-11/msg00008.html
The problem is that some coreutils programs do handle this special
case - i.e. "" as argument for file names - while others do not.
But no-one came up with patches to fix it yet - including me ;-)
Have a nice day,
Berny
- bug#13447: ln "" foo gives misleading error message, (continued)
- bug#13447: ln "" foo gives misleading error message, Eric Blake, 2013/01/17
- bug#13447: ln "" foo gives misleading error message, Pádraig Brady, 2013/01/15
- bug#13447: ln "" foo gives misleading error message, Jim Meyering, 2013/01/15
- bug#13447: ln "" foo gives misleading error message, Pádraig Brady, 2013/01/17
- bug#13447: ln "" foo gives misleading error message, Jim Meyering, 2013/01/17
bug#13447: ln "" foo gives misleading error message, Bob Proulx, 2013/01/15
bug#13447: ln "" foo gives misleading error message,
Bernhard Voelker <=