The scanimage --batcn=format argument is unusual (for scanimage) in that it requires an = in it. The previous argument escaping does not play well, however. Without this change the resultant arguments end up looking like this:
scanimage -d deviceId .... '--batch=img%01d.jpg'
Which scanimage fails to parse well, which in turn causes scans to break.
This commit adds a special method for escaping argument pairs correctly.
The
scanimage --batcn=format
argument is unusual (for scanimage) in that it requires an=
in it. The previous argument escaping does not play well, however. Without this change the resultant arguments end up looking like this:Which scanimage fails to parse well, which in turn causes scans to break.
This commit adds a special method for escaping argument pairs correctly.
Also adds unit test coverage.