diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2017-09-06 13:55:56 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-09-06 13:55:56 +0300 |
commit | 2451029a6ed0e87dceb6c032ddabc3cc091f3927 (patch) | |
tree | e69e696050ab433cb56c98b704a1193c3a6c4b43 | |
parent | 61d28ac73ce1edecebdf68418c7c7a7164e0000a (diff) |
Allow for files with spaces
-rw-r--r-- | include/functions | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/functions b/include/functions index 4699940d..72ea9340 100644 --- a/include/functions +++ b/include/functions @@ -699,15 +699,15 @@ file=$1 find="" if [ ! -z "${DPKGBINARY}" ]; then - find=$(${DPKGBINARY} -S ${file} 2> /dev/null | ${AWKBINARY} -F: '{print $1}') + find=$(${DPKGBINARY} -S "${file}" 2> /dev/null | ${AWKBINARY} -F: '{print $1}') elif [ ! -z "${RPMBINARY}" ]; then - find=$(${RPMBINARY} -qf ${file} 2> /dev/null | ${AWKBINARY} -F- '{print $1}') + find=$(${RPMBINARY} -qf "${file}" 2> /dev/null | ${AWKBINARY} -F- '{print $1}') fi if [ ! -z "${find}" ]; then - LogText "Result: file ${file} belongs to package (${find})" + LogText "Result: file '${file}' belongs to package (${find})" exitcode=0 else - LogText "Result: file ${file} does most likely not belong to a package" + LogText "Result: file '${file}' does most likely not belong to a package" fi return ${exitcode} } |