Browse Source

Attempt to fix 'FileNotFoundError' (defensive coding).

hopefully fixes sentry#CURA-3JS
Remco Burema 3 months ago
parent
commit
1c6e14eb7d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      cura/UI/WelcomePagesModel.py

+ 1 - 2
cura/UI/WelcomePagesModel.py

@@ -217,8 +217,7 @@ class WelcomePagesModel(ListModel):
     def _getBuiltinWelcomePagePath(page_filename: str) -> QUrl:
         """Convenience function to get QUrl path to pages that's located in "resources/qml/WelcomePages"."""
         from cura.CuraApplication import CuraApplication
-        return QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles,
-                                                    os.path.join("WelcomePages", page_filename)))
+        return QUrl.fromLocalFile(Resources.getPath(CuraApplication.ResourceTypes.QmlFiles, "WelcomePages", page_filename))
 
     # FIXME: HACKs for optimization that we don't update the model every time the active machine gets changed.
     def _onActiveMachineChanged(self) -> None: