mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-05 21:53:15 +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
|
from . import ImageFile
|
||||||
|
|
||||||
# may mutate self!
|
# 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()
|
self._ensure_mutable()
|
||||||
else:
|
else:
|
||||||
self.load()
|
self.load()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user