mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Add the suffix if it's not there, not if it is
This commit is contained in:
parent
e0b7f86cf6
commit
844ed441de
|
@ -513,7 +513,7 @@ class Image:
|
|||
if not format or format == "PPM":
|
||||
self.im.save_ppm(file)
|
||||
else:
|
||||
if file.endswith(format):
|
||||
if not file.endswith(format):
|
||||
file = file + "." + format
|
||||
self.save(file, format)
|
||||
return file
|
||||
|
|
Loading…
Reference in New Issue
Block a user