Correctly quote file names for WindowsViewer command

This commit is contained in:
cgohlke 2014-01-01 19:04:30 -08:00
parent 74b5cdde1b
commit db092e7d82

View File

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