Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2021-06-16 14:51:09 +0300
committerJaime van Kessel <nallath@gmail.com>2021-06-16 14:51:09 +0300
commitfa690a0f5e3044dd114b420cfd04a240e0a38c30 (patch)
tree49c138ff0ba36ae0300006f1f26c0c249a730270 /cura/Backups
parentf18e5f96abf89a7b0f5797ff5514799056077224 (diff)
Fix issue with restoring backups from 4.10
There were some cases where issues could occur due to plugins no longer being there CURA-8313
Diffstat (limited to 'cura/Backups')
-rw-r--r--cura/Backups/BackupsManager.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cura/Backups/BackupsManager.py b/cura/Backups/BackupsManager.py
index 6d620b8d27..c69ff4cfd4 100644
--- a/cura/Backups/BackupsManager.py
+++ b/cura/Backups/BackupsManager.py
@@ -55,14 +55,16 @@ class BackupsManager:
restored = backup.restore()
package_manager = self._application.getPackageManager()
+ # Load the new version of the package manager data.
+ package_manager.loadManagementData()
# If the backup was made with Cura 4.10 (or higher), we no longer store plugins.
# Since the restored backup doesn't have those plugins anymore, we should remove it from the list
# of installed plugins.
if Version(meta_data.get("cura_release")) >= Version("4.10.0"):
- for package_id in package_manager.getAllInstalledPackageIDs():
+ for package_id in package_manager.getInstalledPackageIDs():
package_data = package_manager.getInstalledPackageInfo(package_id)
- if package_data.get("package_type") == "plugin" and not package_data.get("is_bundled"):
+ if package_data.get("package_type") == "plugin":
package_manager.removePackage(package_id)
if restored: