mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Merge pull request #4743 from Ultimaker/CURA-5896_strip_exra_curaproject_extensions
[3.6] [CURA-5896] Try to strip extra curaproject extensions
This commit is contained in:
commit
c262635144
1 changed files with 6 additions and 1 deletions
|
@ -371,9 +371,14 @@ 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.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()
|
||||
|
||||
@pyqtProperty(str, fset = setBaseName, notify = baseNameChanged)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue