From 12fdbc30d4580d257e0e204da14b7dd49625455e Mon Sep 17 00:00:00 2001 From: Antoine Lamielle Date: Thu, 8 Sep 2016 01:15:04 -0400 Subject: [PATCH] quoting the source and target path with gm to avoid errors occurring when there are spaces in the the path or in the filename --- prosopopee/prosopopee.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 15aed08..c3310fa 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -143,7 +143,7 @@ class Image(object): "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) print(command)