Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Cura/util/resources.py')
-rw-r--r--Cura/util/resources.py8
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):