From 30cbdfed6952df393f2390cff1f42cc06ea7d7c2 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 31 May 2018 14:50:29 +0200 Subject: [PATCH] Make sure that file extensions are always lowered CURA-5367 --- cura/CuraApplication.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 34b6b5cde1..e416196775 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1572,10 +1572,11 @@ class CuraApplication(QtApplication): f = file.toLocalFile() extension = os.path.splitext(f)[1] + extension = extension.lower() filename = os.path.basename(f) if len(self._currently_loading_files) > 0: # If a non-slicable file is already being loaded, we prevent loading of any further non-slicable files - if extension.lower() in self._non_sliceable_extensions: + if extension in self._non_sliceable_extensions: message = Message( self._i18n_catalog.i18nc("@info:status", "Only one G-code file can be loaded at a time. Skipped importing {0}", @@ -1584,7 +1585,8 @@ class CuraApplication(QtApplication): return # If file being loaded is non-slicable file, then prevent loading of any other files extension = os.path.splitext(self._currently_loading_files[0])[1] - if extension.lower() in self._non_sliceable_extensions: + extension = extension.lower() + if extension in self._non_sliceable_extensions: message = Message( self._i18n_catalog.i18nc("@info:status", "Can't open any other file if G-code is loading. Skipped importing {0}",