From: daid Date: Mon, 18 Aug 2014 14:07:44 +0000 (+0200) Subject: Workaround for startup crash on some macos installs. X-Git-Tag: 14.09~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=fad24c529aa312dd59ceaba45c690fcbe17114f3;p=cura.git Workaround for startup crash on some macos installs. --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index e9ab99eb..f86c2fb3 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -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 diff --git a/plugins/PronterfaceUI/image.png b/plugins/PronterfaceUI/image.png index 2b896bdb..c5ce1c90 100644 Binary files a/plugins/PronterfaceUI/image.png and b/plugins/PronterfaceUI/image.png differ