From 2451029a6ed0e87dceb6c032ddabc3cc091f3927 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Wed, 6 Sep 2017 12:55:56 +0200 Subject: [PATCH] Allow for files with spaces --- include/functions | 8 ++++---- 1 file 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} }