[Fixed] KiCad user template directory autodetection for KiCad 7+

This commit is contained in:
Salvador E. Tropea 2023-06-01 13:00:54 -03:00
parent 336a5521a6
commit bfc7acc647
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
using legacy file extensions (#446)
- Electro-grammar:
- Problems with floating point tolerances (i.e. 0.1%) (#447)
- KiCad user template directory autodetection for KiCad 7+
## [1.6.2] - 2023-04-24
### Added

View File

@ -287,7 +287,7 @@ class KiConf(object):
if home is None:
return None
if GS.ki6:
name = os.path.join(home, '.local', 'share', 'kicad', '6.0', 'template')
name = os.path.join(home, '.local', 'share', 'kicad', str(GS.kicad_version_major)+'.0', 'template')
if os.path.isdir(name):
return name
name = os.path.join(home, 'kicad', 'template')