quoting the source and target path with gm

to avoid errors occurring when there are spaces in the the path or in the filename
This commit is contained in:
Antoine Lamielle 2016-09-08 01:15:04 -04:00 committed by GitHub
parent e14aca70f0
commit 12fdbc30d4

View File

@ -143,7 +143,7 @@ class Image(object):
"progressive": "-interlace Line" if options.get("progressive", None) is True else "" "progressive": "-interlace Line" if options.get("progressive", None) is True else ""
} }
command = "gm convert {source} {auto-orient} {strip} {progressive} {quality} {resize} {target}".format(**gm_switches) command = "gm convert '{source}' {auto-orient} {strip} {progressive} {quality} {resize} '{target}'".format(**gm_switches)
warning("Generation", source) warning("Generation", source)
print(command) print(command)