[ttLib] raise if saving TTFont to the same input file when lazy is True
This commit is contained in:
parent
3f7c67ed50
commit
81b290a47b
@ -185,6 +185,9 @@ class TTFont(object):
|
||||
"""
|
||||
from fontTools.ttLib import sfnt
|
||||
if not hasattr(file, "write"):
|
||||
if self.lazy and self.reader.file.name == file:
|
||||
raise TTLibError(
|
||||
"Can't overwrite TTFont when 'lazy' attribute is True")
|
||||
closeStream = 1
|
||||
file = open(file, "wb")
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user