Prevent filename glob expansion in _msg_opts in rosbash (#218)

The `find` argument glob is not properly quoted resulting in bash filename
expansion. This leads to incorrect `find` calls.

This fixes issue #192.
This commit is contained in:
jexner 2019-08-12 20:48:08 +02:00 committed by Dirk Thomas
parent 71d5d01377
commit c3ce35dc3d
1 changed files with 2 additions and 2 deletions

View File

@ -369,7 +369,7 @@ function _msg_opts {
else
path=$(rospack find ${pkgname})
if [ -d ${path}/msg ]; then
echo $(find -L ${path}/msg -maxdepth 1 -mindepth 1 -name *.msg ! -regex ".*/[.][^./].*" -print0 | tr '\000' '\n' | sed -e "s/.*\/\(.*\)\.msg/${pkgname}\/\1/g")
echo $(find -L ${path}/msg -maxdepth 1 -mindepth 1 -name '*.msg' ! -regex ".*/[.][^./].*" -print0 | tr '\000' '\n' | sed -e "s/.*\/\(.*\)\.msg/${pkgname}\/\1/g")
fi
fi
}
@ -883,7 +883,7 @@ function _msg_opts {
path=$(rospack find ${pkgname} 2> /dev/null)
if [ $? -eq 0 ] && [ -d ${path}/msg ]; then
echo $(find -L ${path}/msg -maxdepth 1 -mindepth 1 -name *.msg ! -regex ".*/[.][^./].*" -print0 | tr '\000' '\n' | sed -e "s/.*\/\(.*\)\.msg/${pkgname}\/\1/g")
echo $(find -L ${path}/msg -maxdepth 1 -mindepth 1 -name '*.msg' ! -regex ".*/[.][^./].*" -print0 | tr '\000' '\n' | sed -e "s/.*\/\(.*\)\.msg/${pkgname}\/\1/g")
fi
}