mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 22:29:41 +08:00
Don't reparse entire file when checking for already extracted version
CURA-6659
This commit is contained in:
parent
6bb3e33c9e
commit
2ca39c8e7f
@ -8,6 +8,7 @@ from UM.PluginRegistry import PluginRegistry
|
||||
from UM.Logger import Logger
|
||||
from UM.Settings.ContainerFormatError import ContainerFormatError
|
||||
from UM.Settings.InstanceContainer import InstanceContainer # The new profile to make.
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.ReaderWriters.ProfileReader import ProfileReader
|
||||
|
||||
import zipfile
|
||||
@ -111,9 +112,10 @@ class CuraProfileReader(ProfileReader):
|
||||
if "general" not in parser:
|
||||
Logger.log("w", "Missing required section 'general'.")
|
||||
return []
|
||||
if "version" not in parser["general"]:
|
||||
Logger.log("w", "Missing required 'version' property")
|
||||
return []
|
||||
|
||||
new_source_version = results.version
|
||||
if int(new_source_version / 1000000) != InstanceContainer.Version or new_source_version % 1000000 != CuraApplication.SettingVersion:
|
||||
Logger.log("e", "Failed to upgrade profile [%s]", profile_id)
|
||||
|
||||
if int(parser["general"]["version"]) != InstanceContainer.Version:
|
||||
Logger.log("e", "Failed to upgrade profile [%s]", profile_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user