weizhouapache commented on code in PR #10898:
URL: https://github.com/apache/cloudstack/pull/10898#discussion_r2103891132


##########
engine/schema/templateConfig.sh:
##########
@@ -79,7 +79,7 @@ templates=( 
"kvm:https://download.cloudstack.org/systemvm/${CS_VERSION}/systemvm
 
 PARENTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P 
)/dist/systemvm-templates/"
 mkdir -p $PARENTPATH
-METADATAFILE=${PARENTPATH}"metadata.ini"
-echo > $METADATAFILE
+METADATAFILE="${PARENTPATH}metadata.ini"
+echo > "$METADATAFILE"
 SOURCEFILE=${PARENTPATH}'md5sum.txt'

Review Comment:
   @vits-hugs 
   my testing result: no space in METADATAFILE
   
   ```
   <08:21:05> weizhou:/tmp $ mkdir "aa bb"
   <08:21:07> weizhou:/tmp $ cd aa\ bb/
   <08:21:09> weizhou:/tmp/aa bb $ 
   <08:21:09> weizhou:/tmp/aa bb $ 
   <08:21:09> weizhou:/tmp/aa bb $ PARENTPATH="$( cd -- "$(dirname "$0")" 
>/dev/null 2>&1 ; pwd -P )/dist/systemvm-templates/"
   <08:21:14> weizhou:/tmp/aa bb $ echo $PARENTPATH
   /usr/bin/dist/systemvm-templates/
   <08:21:26> weizhou:/tmp/aa bb $ METADATAFILE=${PARENTPATH}"metadata.ini"
   <08:22:00> weizhou:/tmp/aa bb $ echo $METADATAFILE
   /usr/bin/dist/systemvm-templates/metadata.ini
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to