Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLipu Fei <lipu.fei815@gmail.com>2018-04-17 16:02:13 +0300
committerLipu Fei <lipu.fei815@gmail.com>2018-04-17 16:02:29 +0300
commitb763b2a5a0a4c25418c28ad0805582a44716d474 (patch)
tree4d40d449c53c24b9c70d940154b00e6644d682a5 /plugins/GCodeGzWriter
parent7b20ce856e6a80505c77c266be22acddd72fc54a (diff)
Fix gcode.gz double extension problem on Mac
CURA-5228
Diffstat (limited to 'plugins/GCodeGzWriter')
-rw-r--r--plugins/GCodeGzWriter/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/GCodeGzWriter/__init__.py b/plugins/GCodeGzWriter/__init__.py
index c001467b3d..a4d576aef6 100644
--- a/plugins/GCodeGzWriter/__init__.py
+++ b/plugins/GCodeGzWriter/__init__.py
@@ -1,16 +1,19 @@
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
+from UM.i18n import i18nCatalog
+from UM.Platform import Platform
+
from . import GCodeGzWriter
-from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
def getMetaData():
+ file_extension = "gz" if Platform.isOSX() else "gcode.gz"
return {
"mesh_writer": {
"output": [{
- "extension": "gcode.gz",
+ "extension": file_extension,
"description": catalog.i18nc("@item:inlistbox", "Compressed G-code File"),
"mime_type": "application/gzip",
"mode": GCodeGzWriter.GCodeGzWriter.OutputMode.BinaryMode