Add the suffix if it's not there, not if it is

This commit is contained in:
wiredfool 2014-04-07 15:59:33 -07:00
parent e0b7f86cf6
commit 844ed441de

View File

@ -513,7 +513,7 @@ class Image:
if not format or format == "PPM": if not format or format == "PPM":
self.im.save_ppm(file) self.im.save_ppm(file)
else: else:
if file.endswith(format): if not file.endswith(format):
file = file + "." + format file = file + "." + format
self.save(file, format) self.save(file, format)
return file return file