aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaXDG.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index 347f1161..cf49977a 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -380,7 +380,11 @@ QString LXDG::findAppMimeForFile(QString filename, bool multiple){
int weight = 0;
QStringList mimefull = LXDG::loadMimeFileGlobs2();
QStringList mimes;
- if(!extension.isEmpty()){ mimes = mimefull.filter(":*."+extension); }
+ if(!extension.isEmpty()){
+ mimes = mimefull.filter(":*."+extension);
+ //If nothing found, try a case-insensitive search
+ if(mimes.isEmpty()){ mimes = mimefull.filter(":*."+extension, Qt::CaseInsensitive); }
+ }
if(mimes.isEmpty()){ mimes = mimefull.filter(":"+filename.left(3)); } //look for the first 3 characters only (FIX WILDCARD DETECTION LATER)
mimes.sort();
QStringList matches;
bgstack15