mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:26:00 +08:00
Fix crash when trying to parse translation files
As some translation files are named with a .def.json.pot extension, they were previously considered for checking as if they were definition files. They are now filtered out.
This commit is contained in:
parent
0f805983a2
commit
ee227673d1
@ -14,10 +14,10 @@ def getLinter(file: Path, settings: dict) -> Optional[List[Linter]]:
|
||||
if not file.exists():
|
||||
return [Directory(file, settings)]
|
||||
|
||||
if ".inst" in file.suffixes and ".cfg" in file.suffixes:
|
||||
if ".inst" in file.suffixes and file.suffixes[-1] == ".cfg":
|
||||
return [Directory(file, settings), Profile(file, settings), Formulas(file, settings)]
|
||||
|
||||
if ".def" in file.suffixes and ".json" in file.suffixes:
|
||||
if ".def" in file.suffixes and file.suffixes[-1] == ".json":
|
||||
if file.stem in ("fdmprinter.def", "fdmextruder.def"):
|
||||
return [Formulas(file, settings)]
|
||||
return [Directory(file, settings), Definition(file, settings), Formulas(file, settings)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user