diff options
author | daid <daid303@gmail.com> | 2015-01-02 16:04:08 +0300 |
---|---|---|
committer | daid <daid303@gmail.com> | 2015-01-02 16:04:08 +0300 |
commit | 1e366958826e05e140cf7624dfc42f3853cca189 (patch) | |
tree | c52a12919767aaa4be73496c84464fded8f101f3 | |
parent | 03f4bb87f5e9678f2d02a413779846d0f64ded93 (diff) |
Fix user defined quickprint profiles.15.01-RC6
-rw-r--r-- | Cura/util/resources.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Cura/util/resources.py b/Cura/util/resources.py index 0259ef97f6..305cc4b174 100644 --- a/Cura/util/resources.py +++ b/Cura/util/resources.py @@ -53,14 +53,18 @@ def getSimpleModeProfiles(): path = os.path.normpath(os.path.join(resourceBasePath, 'quickprint', 'profiles', '*.ini')) user_path = os.path.normpath(os.path.expanduser(os.path.join('~', '.Cura', 'quickprint', 'profiles'))) if os.path.isdir(user_path): - return sorted(glob.glob(user_path)) + files = sorted(glob.glob(os.path.join(user_path, '*.ini'))) + if len(files) > 0: + return files return sorted(glob.glob(path)) def getSimpleModeMaterials(): path = os.path.normpath(os.path.join(resourceBasePath, 'quickprint', 'materials', '*.ini')) user_path = os.path.normpath(os.path.expanduser(os.path.join('~', '.Cura', 'quickprint', 'materials'))) if os.path.isdir(user_path): - return sorted(glob.glob(user_path)) + files = sorted(glob.glob(os.path.join(user_path, '*.ini'))) + if len(files) > 0: + return files return sorted(glob.glob(path)) def setupLocalization(selectedLanguage = None): |