From adf9932d1a1a7a45a786753aca878ed906c25a49 Mon Sep 17 00:00:00 2001 From: q5sys Date: Tue, 31 Oct 2017 10:10:51 -0400 Subject: fix for XDG processing --- src-qt5/core/libLumina/LUtils.cpp | 1 + src-qt5/core/libLumina/LuminaXDG.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/core/libLumina') diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index 65c6ac96..3d3c878a 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -123,6 +123,7 @@ bool LUtils::writeFile(QString filepath, QStringList contents, bool overwrite){ bool LUtils::isValidBinary(QString& bin){ //Trim off any quotes if(bin.startsWith("\"") && bin.endsWith("\"")){ bin.chop(1); bin = bin.remove(0,1); } + if(bin.startsWith("\'") && bin.endsWith("\'")){ bin.chop(1); bin = bin.remove(0,1); } //Now look for relative/absolute path if(!bin.startsWith("/")){ //Relative path: search for it on the current "PATH" settings diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index aaca7bb1..492a296c 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -729,7 +729,8 @@ bool LFileInfo::isAVFile(){ bool LXDG::checkExec(QString exec){ //Return true(good) or false(bad) //Check for quotes around the exec, and remove them as needed - if(exec.startsWith("\"") && exec.count("\"")>=2){ exec = exec.section("\"",1,1); } + if(exec.startsWith("\"") && exec.count("\"")>=2){ exec = exec.section("\"",1,1).simplified(); } + if(exec.startsWith("\'") && exec.count("\'")>=2){ exec = exec.section("\'",1,1).simplified(); } if(exec.startsWith("/")){ return QFile::exists(exec); } else{ QStringList paths = QString(getenv("PATH")).split(":"); -- cgit