Fix gcode.gz double extension problem on Mac

CURA-5228
This commit is contained in:
Lipu Fei 2018-04-17 15:02:13 +02:00
parent 7b20ce856e
commit b763b2a5a0
3 changed files with 14 additions and 8 deletions

View file

@ -3,11 +3,11 @@
import gzip
from io import TextIOWrapper
from UM.Platform import Platform
from UM.Mesh.MeshReader import MeshReader #The class we're extending/implementing.
from UM.PluginRegistry import PluginRegistry
## A file reader that reads gzipped g-code.
#
# If you're zipping g-code, you might as well use gzip!
@ -15,7 +15,7 @@ class GCodeGzReader(MeshReader):
def __init__(self):
super().__init__()
self._supported_extensions = [".gcode.gz"]
self._supported_extensions = [".gz"]
def read(self, file_name):
with open(file_name, "rb") as file: