From cb994d966e66d26c9745afef01c5e55c5c804fea Mon Sep 17 00:00:00 2001 From: Renaud Guillard Date: Thu, 31 Oct 2024 23:39:55 +0100 Subject: [PATCH] ... another way to check symlink --- tests/xsh/relativepath.xsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/xsh/relativepath.xsh b/tests/xsh/relativepath.xsh index b759ce1..7cf2958 100644 --- a/tests/xsh/relativepath.xsh +++ b/tests/xsh/relativepath.xsh @@ -41,14 +41,14 @@ do || return 1 target="$(ns_realpath "${ns_testsuite_relativepath_root}/${target}")" [ -d "${target}" ] || return 1 - elif [ -L "${target}" ] - then - echo "warning: Could not use symbolic link ${target} as target" 1>&2 - continue elif [ ! -r "${target}" ] then echo 'warning: ' "${target} does not exists" 1>&2 continue + elif [ "${target}" != "$(ns_realpath "${target}")" ] + then + echo "warning: Could not use symbolic link ${target} as target" 1>&2 + continue fi if [ "${source:0:1}" != '/' ]