[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: coreutils bug with "ln x d/"
From: |
Paul Eggert |
Subject: |
Re: coreutils bug with "ln x d/" |
Date: |
Mon, 28 Jun 2004 11:04:08 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
address@hidden (Paul Jarc) writes:
> when at least one trailing character of the link name is given
> literally rather than through a variable, there will be no
> surprises.
Yes, if you have control over the suffix, then you won't have any
problem. But I was worried about the more general case.
>> case $y in
>> */) echo >&2 "target ends in /"; exit 1;;
>
> Stripping off the "/" before calling ln would work too.
Not if the target is "/", or "//", or "foo//".
> (The DOS version of --syntactic would have to check for
> either "/" or "\" at the end, yes?)
No, it's more complicated than that. For example, "C:" counts as a
syntactic directory in DOS. (And I have no idea what the syntactic
rules for OpenVMS would be. :-)
I guess my point is that the --syntactic rules are relatively
complicated, even for POSIX (as per the "/" and "foo//" examples), and
certainly for non-POSIX systems; whereas the --no-target-directory
rule is relatively simple.
> --syntactic won't be surprising, and can offer some convenience -
> you can omit the basename from the target if it's the same as the
> source's.
If you want to do that, you can use --target-directory already.