mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +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":
|
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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user