mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-21 21:29:41 +08:00
Fix possible crash of profile name checker
This commit is contained in:
parent
639fcca86a
commit
0f805983a2
@ -37,6 +37,6 @@ class Profile(Linter):
|
|||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read([self._file])
|
config.read([self._file])
|
||||||
name_of_profile = config.get("general", "name")
|
name_of_profile = config.get("general", "name")
|
||||||
redefined = re.compile(name_of_profile)
|
redefined = re.compile(re.escape(name_of_profile))
|
||||||
found = redefined.search(self._content)
|
found = redefined.search(self._content)
|
||||||
return name_of_profile, found
|
return name_of_profile, found
|
||||||
|
Loading…
x
Reference in New Issue
Block a user