Also send built-in profiles

The printer firmware won't add them currently so we're sending these profiles to their doom. However a later firmware update might fix this so we can make older Cura versions send the profiles as well so that it is forward compatible.

Contributes to issue CURA-5034.
This commit is contained in:
Ghostkeeper 2018-06-12 13:45:58 +02:00
parent 0a557fdb79
commit 194bb5e8c8
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -72,9 +72,10 @@ class SendMaterialJob(Job):
return
for file_path in Resources.getAllResourcesOfType(CuraApplication.ResourceTypes.MaterialInstanceContainer):
if not file_path.startswith(Resources.getDataStoragePath() + os.sep): #No built-in profiles.
continue
mime_type = MimeTypeDatabase.getMimeTypeForFile(file_path)
try:
mime_type = MimeTypeDatabase.getMimeTypeForFile(file_path)
except MimeTypeDatabase.MimeTypeNotFoundError:
continue #Not the sort of file we'd like to send then.
_, file_name = os.path.split(file_path)
material_id = urllib.parse.unquote_plus(mime_type.stripExtension(file_name))
if material_id not in materials_to_send: