#44110: coreutils @8.22_0 - ln fails to create symbolic links if source and target differ in character case only (and creates hidden hardlinks instead) -------------------------+-------------------------------- Reporter: scubi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Keywords: ln, symlink | Port: coreutils -------------------------+-------------------------------- `/opt/local/libexec/gnubin/ln` fails to create a symbolic link if the name of the target and the directory differ only in character case. In that case a symbolic link is created below the source directory and you end up with a **hidden** hardlink if the newly created symlink is deleted! The behavior can be reproduced by following these steps: * create a directory `Foo` and try to create a symbolic link to that directory called `foo` * delete the wrongly placed symlink `Foo/foo` * list the directory `Foo` was created in * list the content of `Foo` as well as `foo` !!!!!!!! * list the inodes of `Foo` and the **hidden** `foo` {{{ indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:07 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. indigo:gnu-ln-test scubi$ mkdir Foo indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 2 scubi staff 68 22. Jun 15:12 Foo indigo:gnu-ln-test scubi$ ln -s Foo/ foo indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 3 scubi staff 102 22. Jun 15:13 Foo indigo:gnu-ln-test scubi$ ls -al Foo/ insgesamt 4 drwxr-xr-x 3 scubi staff 102 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. lrwxr-xr-x 1 scubi staff 4 22. Jun 15:13 Foo -> Foo/ indigo:gnu-ln-test scubi$ rm Foo/Foo indigo:gnu-ln-test scubi$ ls -al Foo/ insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. indigo:gnu-ln-test scubi$ ls -al insgesamt 0 drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 Foo indigo:gnu-ln-test scubi$ ls -al Foo foo Foo: insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. foo: insgesamt 0 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 . drwxr-xr-x 3 scubi staff 102 22. Jun 15:12 .. indigo:gnu-ln-test scubi$ ls -ldi Foo/ foo 2028539 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 Foo/ 2028539 drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 foo indigo:gnu-ln-test scubi$ }}} Due to the fact that this sounds unbelievable - I also attached a screenshot :) BTW: creating the symlink with a different name works as expected: {{{ indigo:gnu-ln-test scubi$ ln -s Foo/ boo indigo:gnu-ln-test scubi$ ls -al insgesamt 4 drwxr-xr-x 4 scubi staff 136 22. Jun 15:25 . drwxr-xr-x+ 36 scubi staff 1224 22. Jun 14:51 .. drwxr-xr-x 2 scubi staff 68 22. Jun 15:13 Foo lrwxr-xr-x 1 scubi staff 4 22. Jun 15:25 boo -> Foo/ indigo:gnu-ln-test scubi$ }}} -- Ticket URL: <https://trac.macports.org/ticket/44110> MacPorts <http://www.macports.org/> Ports system for OS X