aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaXDG.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp
index 95d3ab02..85a90aa9 100644
--- a/libLumina/LuminaXDG.cpp
+++ b/libLumina/LuminaXDG.cpp
@@ -429,9 +429,12 @@ QString LXDG::findAppMimeForFile(QString filename, bool multiple){
matches << mime;
}
//qDebug() << "Matches:" << matches;
- if(multiple){ out = matches.join("::::"); }
+ if(multiple && !matches.isEmpty() ){ out = matches.join("::::"); }
else if( !matches.isEmpty() ){ out = matches.first(); }
- else{ out.clear(); }
+ else{ //no mimetype found - assign one (internal only - no system database changes)
+ if(extension.isEmpty()){ out = "unknown/"+filename.toLower(); }
+ else{ out = "unknown/"+extension.toLower(); }
+ }
//qDebug() << "Out:" << out;
return out;
}
bgstack15