mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
CURA-5357 Move the plugin info in packages.json only when the
installation succeeded.
This commit is contained in:
parent
39b71add07
commit
1285e1b5e5
1 changed files with 2 additions and 1 deletions
|
@ -105,7 +105,6 @@ class CuraPackageManager(QObject):
|
|||
while self._to_install_package_dict:
|
||||
package_id, package_info = list(self._to_install_package_dict.items())[0]
|
||||
self._installPackage(package_info)
|
||||
self._installed_package_dict[package_id] = self._to_install_package_dict[package_id]
|
||||
del self._to_install_package_dict[package_id]
|
||||
self._saveManagementData()
|
||||
|
||||
|
@ -328,6 +327,8 @@ class CuraPackageManager(QObject):
|
|||
|
||||
# Remove the file
|
||||
os.remove(filename)
|
||||
# Move the info to the installed list of packages only when it succeeds
|
||||
self._installed_package_dict[package_id] = self._to_install_package_dict[package_id]
|
||||
|
||||
def __installPackageFiles(self, package_id: str, src_dir: str, dst_dir: str) -> None:
|
||||
Logger.log("i", "Moving package {package_id} from {src_dir} to {dst_dir}".format(package_id=package_id, src_dir=src_dir, dst_dir=dst_dir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue