mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-14 06:14:14 +03:00
Compare absolute path of filename
This commit is contained in:
parent
1103e82d17
commit
8dbbce624f
|
@ -2543,7 +2543,9 @@ class Image:
|
|||
from . import ImageFile
|
||||
|
||||
# may mutate self!
|
||||
if isinstance(self, ImageFile.ImageFile) and filename == self.filename:
|
||||
if isinstance(self, ImageFile.ImageFile) and os.path.abspath(
|
||||
filename
|
||||
) == os.path.abspath(self.filename):
|
||||
self._ensure_mutable()
|
||||
else:
|
||||
self.load()
|
||||
|
|
Loading…
Reference in New Issue
Block a user