Browse Source

Added workaround for curaproject.3mf extensions not being handled on osx

CURA-3130
Jaime van Kessel 8 years ago
parent
commit
8676f3db40
1 changed files with 7 additions and 1 deletions
  1. 7 1
      plugins/3MFReader/__init__.py

+ 7 - 1
plugins/3MFReader/__init__.py

@@ -4,10 +4,16 @@
 from . import ThreeMFReader
 from . import ThreeMFWorkspaceReader
 from UM.i18n import i18nCatalog
+import UM.Platform
 catalog = i18nCatalog("cura")
 
 
 def getMetaData():
+    # Workarround for osx not supporting double file extensions correclty.
+    if UM.Platform.isOSX():
+        workspace_extension = "3mf"
+    else:
+        workspace_extension = "curaproject.3mf"
     return {
         "plugin": {
             "name": catalog.i18nc("@label", "3MF Reader"),
@@ -25,7 +31,7 @@ def getMetaData():
         "workspace_reader":
         [
             {
-                "extension": "curaproject.3mf",
+                "extension": workspace_extension,
                 "description": catalog.i18nc("@item:inlistbox", "3MF File")
             }
         ]