unarchive 14116
forcemerge 14116 17126 23564
close 23564
stop

On 17/05/16 10:56, Florian Schweiger wrote:
Hi,

I've noticed the following unexpected behaviour in `ln` which appears to
be a bug. I'm referring to the attached MWE Bash script
test_ln-symbolic-interactive-relative.sh.

When run, it creates a directory "test_dir" and a file "test_file" in
the current working directory. Then it tries to create a relative,
symbolic link to the file in said directory. When the "--interactive"
option is present, this operation fails every other time in that it
overwrites the existing link with an unreachable target.

DETAILED DESCRIPTION:

* First invocation
      $ ./test_ln-symbolic-interactive-relative.sh
      ln -sirv test_file test_dir/test_link
      ‘test_dir/test_link’ -> ‘../test_file’
* Second invocation:
      $ ./test_ln-symbolic-interactive-relative.sh
      ln -sirv test_file test_dir/test_link
      ln: replace ‘test_dir/test_link’? y
      ‘test_dir/test_link’ -> ‘test_file’
* Third invocation:
      $ ./test_ln-symbolic-interactive-relative.sh
      ln -sirv test_file test_dir/test_link
      ln: replace ‘test_dir/test_link’? y
      ‘test_dir/test_link’ -> ‘../test_file’


AFFECTED SYSTEM:
      * ln (GNU coreutils) 8.21
      * GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
      * Ubuntu 14.04.4 LTS

This was fixed in V8.22 with:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.21-27-ge52293a

thanks,
Pádraig



Reply via email to