[Schematic v6] Create sub-dirs when saving subsheets

- Even KiCad fails to do it
This commit is contained in:
Salvador E. Tropea 2024-01-26 13:00:38 -03:00
parent fe4f0f6e6b
commit 9c074e0bb9
1 changed files with 1 additions and 1 deletions

View File

@ -2025,7 +2025,7 @@ class SchematicV6(Schematic):
if os.path.isfile(fname):
bkp = fname+'-bak'
os.replace(fname, bkp)
with open(fname, 'wt') as f:
with GS.create_file(fname) as f:
f.write(dumps(sch))
f.write('\n')
saved.add(fname)