mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Run upgrader on imported profiles from >2.1
Oops... It should upgrade the old profiles so that they have the correct version and setting version.
This commit is contained in:
parent
7fbdccffdb
commit
0498d43834
1 changed files with 6 additions and 3 deletions
|
@ -35,9 +35,12 @@ class CuraProfileReader(ProfileReader):
|
|||
for profile_id in archive.namelist():
|
||||
with archive.open(profile_id) as f:
|
||||
serialized = f.read()
|
||||
profile = self._loadProfile(serialized.decode("utf-8"), profile_id)
|
||||
if profile is not None:
|
||||
results.append(profile)
|
||||
upgraded_profiles = self._upgradeProfile(serialized.decode("utf-8"), profile_id) #After upgrading it may split into multiple profiles.
|
||||
for upgraded_profile in upgraded_profiles:
|
||||
serialization, new_id = upgraded_profile
|
||||
profile = self._loadProfile(serialization, new_id)
|
||||
if profile is not None:
|
||||
results.append(profile)
|
||||
return results
|
||||
|
||||
except zipfile.BadZipFile:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue