Only look for user package management path in storage dirs

If we happen to find it in the installation (or some other place we can't write to) then it's going to crash. So don't do that.

Contributes to issue CURA-5364.
This commit is contained in:
Ghostkeeper 2018-05-16 09:29:03 +02:00
parent ed6b63b41b
commit eab150d7ee
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -32,6 +32,7 @@ class CuraPackageManager(QObject):
candidate_bundled_path = os.path.join(search_path, "bundled_packages.json")
if os.path.exists(candidate_bundled_path):
self._bundled_package_management_file_path = candidate_bundled_path
for search_path in (Resources.getDataStoragePath(), Resources.getConfigStoragePath()):
candidate_user_path = os.path.join(search_path, "packages.json")
if os.path.exists(candidate_user_path):
self._user_package_management_file_path = candidate_user_path