mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +08:00
Defensive coding: Old file-extensions may have been saved as all-caps. [CURA-5896]
This commit is contained in:
parent
3db85b2493
commit
94924783b6
@ -371,12 +371,12 @@ class PrintInformation(QObject):
|
||||
|
||||
# Strip the old "curaproject" extension from the name
|
||||
OLD_CURA_PROJECT_EXT = ".curaproject"
|
||||
if self._base_name.endswith(OLD_CURA_PROJECT_EXT):
|
||||
if self._base_name.lower().endswith(OLD_CURA_PROJECT_EXT):
|
||||
self._base_name = self._base_name[:len(self._base_name) - len(OLD_CURA_PROJECT_EXT)]
|
||||
|
||||
# CURA-5896 Try to strip extra extensions with an infinite amount of ".curaproject.3mf".
|
||||
OLD_CURA_PROJECT_3MF_EXT = ".curaproject.3mf"
|
||||
while self._base_name.endswith(OLD_CURA_PROJECT_3MF_EXT):
|
||||
while self._base_name.lower().endswith(OLD_CURA_PROJECT_3MF_EXT):
|
||||
self._base_name = self._base_name[:len(self._base_name) - len(OLD_CURA_PROJECT_3MF_EXT)]
|
||||
|
||||
self._updateJobName()
|
||||
|
Loading…
x
Reference in New Issue
Block a user