From 3e9e72e128c1e1bd781a5c9981f8c6db532ae2ee Mon Sep 17 00:00:00 2001 From: Tristan Donkers Date: Sun, 23 Aug 2015 10:06:14 +1000 Subject: [PATCH] Move the if block for making paths absolute into the server_set_property() function. --- init/msm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/init/msm b/init/msm index e482a65..09e841f 100755 --- a/init/msm +++ b/init/msm @@ -1714,7 +1714,13 @@ server_connected() { # $2: The name of the server property # $3: The value for the property server_set_property() { - eval SERVER_$2[$1]=\"$3\" + # If it is a path make that path absolute + if [[ "$2" =~ _PATH$ ]]; then + server_property "$1" PATH + eval SERVER_$2[$1]=\"${SERVER_PATH[$1]}/$3\" + else + eval SERVER_$2[$1]=\"$3\" + fi } # Get the value of a server property @@ -1823,12 +1829,6 @@ server_property() { ### Post-changes to variables after loading - # If it is a path make that path absolute - if [[ "$2" =~ _PATH$ ]]; then - server_property "$1" PATH - eval SERVER_$2[$1]=\"${SERVER_PATH[$1]}/\${SERVER_$2[$1]}\" - fi - # Replace any place holders in a property we just loaded case "$2" in SCREEN_NAME)