Howdy.

An issue bit me recently. Consider the following:

$ cd
$ mkdir -p realfolder/subfolder
$ ln -s realfolder linkedfolder
$ cd linkedfolder
$ realpath --no-symlinks blah
/home/.../realfolder/blah
$ cd subfolder
$ realpath --no-symlinks blah
/home/.../linkedfolder/subfolder/blah

The first call to realpath resolves the relative path to "blah" to be
an absolute path, but it is resolving symlinks for the current working
folder (.) even though --no-symlinks is given.

The second call happens inside a subfolder, not directly inside the
linked folder and realpath is no longer resolving the symlinks for
that one.

This is inconsistent behavior and seems to me it violate the
--no-symlinks option,

Comments ?

Thank you !

Reply via email to