chiark / gitweb /
Workaround for startup crash on some macos installs.
authordaid <daid303@gmail.com>
Mon, 18 Aug 2014 14:07:44 +0000 (16:07 +0200)
committerdaid <daid303@gmail.com>
Mon, 18 Aug 2014 14:07:44 +0000 (16:07 +0200)
Cura/util/profile.py
plugins/PronterfaceUI/image.png

index e9ab99ebe153d63f906aca6c46ffad7067a1ebf7..f86c2fb3bd383dc353b84a72af74fb7d4f00a25e 100644 (file)
@@ -614,25 +614,28 @@ def getAlternativeBasePaths():
        Search for alternative installations of Cura and their preference files. Used to load configuration from older versions of Cura.
        """
        paths = []
-       basePath = os.path.normpath(os.path.join(getBasePath(), '..'))
-       for subPath in os.listdir(basePath):
-               path = os.path.join(basePath, subPath)
-               if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != getBasePath():
-                       paths.append(path)
-               path = os.path.join(basePath, subPath, 'Cura')
-               if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != getBasePath():
-                       paths.append(path)
-
-       #Check the old base path, which was in the application directory.
-       oldBasePath = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
-       basePath = os.path.normpath(os.path.join(oldBasePath, ".."))
-       for subPath in os.listdir(basePath):
-               path = os.path.join(basePath, subPath)
-               if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != oldBasePath:
-                       paths.append(path)
-               path = os.path.join(basePath, subPath, 'Cura')
-               if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != oldBasePath:
-                       paths.append(path)
+       try:
+               basePath = os.path.normpath(os.path.join(getBasePath(), '..'))
+               for subPath in os.listdir(basePath):
+                       path = os.path.join(basePath, subPath)
+                       if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != getBasePath():
+                               paths.append(path)
+                       path = os.path.join(basePath, subPath, 'Cura')
+                       if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != getBasePath():
+                               paths.append(path)
+
+               #Check the old base path, which was in the application directory.
+               oldBasePath = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".."))
+               basePath = os.path.normpath(os.path.join(oldBasePath, ".."))
+               for subPath in os.listdir(basePath):
+                       path = os.path.join(basePath, subPath)
+                       if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != oldBasePath:
+                               paths.append(path)
+                       path = os.path.join(basePath, subPath, 'Cura')
+                       if os.path.isdir(path) and os.path.isfile(os.path.join(path, 'preferences.ini')) and path != oldBasePath:
+                               paths.append(path)
+       except:
+               pass
 
        return paths
 
index 2b896bdbe29761c442ca34d205ebb1c3f3ff5ab1..c5ce1c90758944ab594d7de7b8d47564c676a0bd 100644 (file)
Binary files a/plugins/PronterfaceUI/image.png and b/plugins/PronterfaceUI/image.png differ