Cura/cura/CuraPackageManager.py
Diego Prado Gesto 6737dfac47 Protect against crashes when the temporary file is still in use by
another process.

Contributes to CURA-5516.
2018-06-28 16:09:00 +02:00

17 lines
798 B
Python

# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from cura.CuraApplication import CuraApplication #To find some resource types.
from UM.PackageManager import PackageManager #The class we're extending.
from UM.Resources import Resources #To find storage paths for some resource types.
class CuraPackageManager(PackageManager):
def __init__(self, application, parent = None):
super().__init__(application, parent)
def initialize(self):
self._installation_dirs_dict["materials"] = Resources.getStoragePath(CuraApplication.ResourceTypes.MaterialInstanceContainer)
self._installation_dirs_dict["qualities"] = Resources.getStoragePath(CuraApplication.ResourceTypes.QualityInstanceContainer)
super().initialize()