mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 01:04:29 +03:00
Use os.path.realpath consistently when os.fspath is used
This commit is contained in:
parent
a276cf2c9f
commit
a118a82c30
|
@ -2385,7 +2385,7 @@ class Image:
|
|||
filename = ""
|
||||
open_fp = False
|
||||
if is_path(fp):
|
||||
filename = os.fspath(fp)
|
||||
filename = os.path.realpath(os.fspath(fp))
|
||||
open_fp = True
|
||||
elif fp == sys.stdout:
|
||||
try:
|
||||
|
|
|
@ -230,7 +230,7 @@ class FreeTypeFont:
|
|||
)
|
||||
|
||||
if is_path(font):
|
||||
font = os.fspath(font)
|
||||
font = os.path.realpath(os.fspath(font))
|
||||
if sys.platform == "win32":
|
||||
font_bytes_path = font if isinstance(font, bytes) else font.encode()
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue
Block a user