mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Protect against crashes when the temporary file is still in use by
another process. Contributes to CURA-5516.
This commit is contained in:
parent
c25a733768
commit
6737dfac47
1 changed files with 4 additions and 1 deletions
|
@ -330,7 +330,10 @@ class CuraPackageManager(QObject):
|
|||
self.__installPackageFiles(package_id, src_dir_path, dst_dir_path)
|
||||
|
||||
# Remove the file
|
||||
os.remove(filename)
|
||||
try:
|
||||
os.remove(filename)
|
||||
except Exception:
|
||||
Logger.log("w", "Tried to delete file [%s], but it failed", 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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue