coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Realpath resolving current folder with no-symlinks


From: João Eiras
Subject: Realpath resolving current folder with no-symlinks
Date: Mon, 16 Oct 2017 13:23:00 +0200

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

[Prev in Thread] Current Thread [Next in Thread]