Browse Source

Don't crash on NotADirectoryError or PermissionError when trying to load custom intent icons

CURA-9709
c.lamboo 1 year ago
parent
commit
fec5ebb709
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Machines/Models/IntentSelectionModel.py

+ 1 - 1
cura/Machines/Models/IntentSelectionModel.py

@@ -115,7 +115,7 @@ class IntentSelectionModel(ListModel):
                     try:
                         icon = QUrl.fromLocalFile(
                             Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.ImageFiles, icon))
-                    except FileNotFoundError:
+                    except (FileNotFoundError, NotADirectoryError, PermissionError):
                         Logger.log("e", f"Icon file for intent {intent_name} not found.")
                         icon = None