Quote the --mode argument for printers like Brother DCP-7065DN which use spaces in mode names

This commit is contained in:
Oleg Pudeyev 2021-07-27 20:25:01 -04:00
parent 084f0723b8
commit cfce23c271

2
scan
View File

@ -263,7 +263,7 @@ echo >&2 "Scanning..."
if [[ $MODE_HW_DEFAULT == 1 ]]; then
MODE=
else
MODE="--mode $MODE"
MODE="--mode '$MODE'"
fi
eval scanadf -d \'"$DEVICE"\' $MAXPAGE $PGHEIGHT $PGWIDTH -S $SCRIPT --script-wait --resolution $RESOLUTION $MODE $DESKEW $CROP $DRIVER_OPTION $SOURCE -o $TMP_DIR/scan-%04d