Browse Source

Strip the old "curaproject" extension from project name

CURA-5896
Lipu Fei 6 years ago
parent
commit
93afaf64c6
1 changed files with 5 additions and 0 deletions
  1. 5 0
      cura/PrintInformation.py

+ 5 - 0
cura/PrintInformation.py

@@ -369,6 +369,11 @@ class PrintInformation(QObject):
             else:
                 self._base_name = ""
 
+            # Strip the old "curaproject" extension from the name
+            OLD_CURA_PROJECT_EXT = ".curaproject"
+            if self._base_name.endswith(OLD_CURA_PROJECT_EXT):
+                self._base_name = self._base_name[:len(self._base_name) - len(OLD_CURA_PROJECT_EXT)]
+
             self._updateJobName()
 
     @pyqtProperty(str, fset = setBaseName, notify = baseNameChanged)