Просмотр исходного кода

Re-enable the backing up of plugins

Because we're adding a messgae for the user if the loading of a plugin failed
(which can happen after backing up a plugin in central storage), we can re-enable
the backing up of plugins again.

CURA-8313
Jaime van Kessel 3 лет назад
Родитель
Сommit
40a981b902
2 измененных файлов с 1 добавлено и 14 удалено
  1. 1 1
      cura/Backups/Backup.py
  2. 0 13
      cura/Backups/BackupsManager.py

+ 1 - 1
cura/Backups/Backup.py

@@ -29,7 +29,7 @@ class Backup:
     IGNORED_FILES = [r"cura\.log", r"plugins\.json", r"cache", r"__pycache__", r"\.qmlc", r"\.pyc"]
     """These files should be ignored when making a backup."""
 
-    IGNORED_FOLDERS = [r"plugins"]
+    IGNORED_FOLDERS = []
 
     SECRETS_SETTINGS = ["general/ultimaker_auth_data"]
     """Secret preferences that need to obfuscated when making a backup of Cura"""

+ 0 - 13
cura/Backups/BackupsManager.py

@@ -54,19 +54,6 @@ class BackupsManager:
         backup = Backup(self._application, zip_file = zip_file, meta_data = meta_data)
         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.getInstalledPackageIDs():
-                package_data = package_manager.getInstalledPackageInfo(package_id)
-                if package_data.get("package_type") == "plugin":
-                    package_manager.removePackage(package_id)
-
         if restored:
             # At this point, Cura will need to restart for the changes to take effect.
             # We don't want to store the data at this point as that would override the just-restored backup.