From bef675d06c3014a76073027368bd96138be4bb1d Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 8 Jun 2016 16:17:29 -0400 Subject: Fix a bug with detecting/using KDE applications as the defaults for particular mimetypes. --- src-qt5/core/libLumina/LuminaXDG.cpp | 19 ++++++------------- src-qt5/core/lumina-open/LFileDialog.cpp | 4 ++-- src-qt5/core/lumina-open/main.cpp | 1 + 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index bfca4f71..68cd84bc 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -859,13 +859,15 @@ QString LXDG::findDefaultAppForMime(QString mime){ if(!QFile::exists(dirs[i])){ continue; } QStringList info = LUtils::readFile(dirs[i]); if(info.isEmpty()){ continue; } - QString workdir = dirs[i].section("/",0,-1); //just the directory + QString workdir = dirs[i].section("/",0,-2); //just the directory + // qDebug() << "Check File:" << mime << dirs[i] << workdir; int def = info.indexOf("[Default Applications]"); //find this line to start on if(def>=0){ for(int d=def+1; d