From 609086db135aac50ab83825aed16c9481c99715d Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 17 Jan 2017 13:02:25 +0000 Subject: [PATCH] honour treeroot variable in file serving svn path=/trunk/; revision=52 --- server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.sh b/server.sh index f876069..c49c0d8 100755 --- a/server.sh +++ b/server.sh @@ -94,6 +94,6 @@ HTTP_format(){ if [ -z "$QUERY_STRING" ]; then PATH_INFO="$(printf "$(printf %s "$PATH_INFO" |sed 's:+: :g;s:\\:\\\\:g;s:%:\\x:g')")" PATH_INFO="$(invalidate "${PATH_INFO}" '(^|.*/)\.\./.*' '')" - [ -f "$_DATA/$PATH_INFO" ] && . "$_EXEC/shcgi/static.sh" "$_DATA/$PATH_INFO" + [ -f "${treeroot:-${_DATA}}/$PATH_INFO" ] && . "$_EXEC/shcgi/static.sh" "${treeroot:-${_DATA}}/$PATH_INFO" exit 0 fi |HTTP_format -- 2.39.2