Dots in the ID no longer confuse workspace reader

CURA-3450
This commit is contained in:
Jaime van Kessel 2017-03-02 17:06:10 +01:00
parent 30eca943d0
commit bae7af1ea0

View file

@ -476,7 +476,9 @@ class ThreeMFWorkspaceReader(WorkspaceReader):
return nodes return nodes
def _stripFileToId(self, file): def _stripFileToId(self, file):
return file.replace("Cura/", "").split(".")[0] mime_type = MimeTypeDatabase.getMimeTypeForFile(file)
file = mime_type.stripExtension(file)
return file.replace("Cura/", "")
def _getXmlProfileClass(self): def _getXmlProfileClass(self):
return self._container_registry.getContainerForMimeType(MimeTypeDatabase.getMimeType("application/x-ultimaker-material-profile")) return self._container_registry.getContainerForMimeType(MimeTypeDatabase.getMimeType("application/x-ultimaker-material-profile"))