From dfc6724e0d5624443639382a138bf1d6f75a3481 Mon Sep 17 00:00:00 2001 From: Tokash Date: Sun, 23 May 2021 00:13:11 -0400 Subject: [PATCH] Fix for issue #6 Padding file variable with quotes to prevent issues with unescaped spaces in the file name. --- assets/bin/scanner.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/bin/scanner.sh b/assets/bin/scanner.sh index fa33fc7..4b51ae8 100644 --- a/assets/bin/scanner.sh +++ b/assets/bin/scanner.sh @@ -4,8 +4,8 @@ if (( ${#files} )) then printf "Found files to process\n" for file in "/data/av/queue"/* ; do - filename=`basename $file` - mv -f $file "/data/av/scan/${filename}" + filename=`basename "$file"` + mv -f "$file" "/data/av/scan/${filename}" printf "Processing /data/av/scan/${filename}\n" /usr/local/bin/scanfile.sh > /data/av/scan/info 2>&1 if [ -e "/data/av/scan/${filename}" ]