-
Committer:
Aleksey Kravchenko
-
Author(s):
Theodore Ts'o
-
Date:
2020-08-30 20:40:06 UTC
-
Revision ID:
git-v1:260007101db3e173963b11734d783c0e165fe600
Bugfix: only follow symbolic links when --follow is specified
Currently, we are following symbolic links when doing a recursive
descent through the directory tree even when --follow is not
specified. This change does change behavior so that we don't follow
symlinks for both *directories* and *files* unless the --follow option
is specified. This may or may not be what other users are depending
upon, since the documentation originally defines --follow as:
Follow symbolic links when processing directories recursively.
There is _no_ other documentation describing how symlinks to regular
files are supposed to be handled. So it's not clear to me whether is
wanted for symlinks to regular files. However, for _my_ use, this is
actually what I want, so I'm just going to change the man page.
It may be that what there should be are separate options,
--follow-symlinked-dirs and --follow-symlinked-files, but that would
require a lstat() and a fstat() when a symlink is found so we can
disambiguate between these two cases.
Fixes-github-RHash-bug: #131
Signed-off-by: Theodore Ts'o <tytso@mit.edu>