aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2022-02-28 18:11:14 +0000
committermerakor <cem@ckyln.com>2022-02-28 18:11:14 +0000
commit3e26a7c96254806602086301333ed64ebed6c38a (patch)
tree88a6055d1e6be9e09377042597a7ed1a6cf1b0cc
parent4ea51195f7530abd14f2fd06c133e6eee8fbeabf (diff)
downloadcpt-3e26a7c96254806602086301333ed64ebed6c38a.tar.gz
_readlinkf(): do not run under subshell
FossilOrigin-Name: 25e6e10ed50b47d1367df83c93cbbdf8b25408d4eeb0aca60e0bc9c9f20fc3b4
-rw-r--r--src/cpt-lib.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 9b71eab..d8fd262 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -172,7 +172,7 @@ _stat() (
printf '%s' "$_user"
)
-_readlinkf() (
+_readlinkf() {
# Public domain POSIX sh readlink function by Koichi Nakashima
[ "${1:-}" ] || return 1
max_symlinks=40
@@ -206,7 +206,7 @@ _readlinkf() (
target=${link#*" $target -> "}
done
return 1
-)
+}
_get_digest() {
# Get digest algorithm from the given file. It looks for a header on the