Merge pull request #467 from cgohlke/patch-1

Correctly quote file names for WindowsViewer command
This commit is contained in:
Alex Clark ☺ 2014-01-02 02:06:06 -08:00
commit 8dd8bdf238

View File

@ -103,8 +103,9 @@ if sys.platform == "win32":
class WindowsViewer(Viewer): class WindowsViewer(Viewer):
format = "BMP" format = "BMP"
def get_command(self, file, **options): def get_command(self, file, **options):
return ("start /wait %s && ping -n 2 127.0.0.1 >NUL " return ('start "Pillow" /WAIT "%s" '
"&& del /f %s" % (quote(file), quote(file))) '&& ping -n 2 127.0.0.1 >NUL '
'&& del /f "%s"' % (file, file))
register(WindowsViewer) register(WindowsViewer)