Skip to content

Commit

Permalink
... another way to check symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
noresources committed Oct 31, 2024
1 parent 6696615 commit cb994d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/xsh/relativepath.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -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}" != '/' ]
Expand Down

0 comments on commit cb994d9

Please sign in to comment.