diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-27 09:24:11 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-27 09:24:11 -0400 |
commit | f8b26186ce5b6a018d2c833188fb1e9ee7f902d5 (patch) | |
tree | 2b9a65b2df9b6c20e6b863862913c28572afb9ff /src-qt5/core/libLumina/LUtils.cpp | |
parent | Add the ability to use a "directory" as the target for desktop wallpapers. Wi... (diff) | |
download | lumina-f8b26186ce5b6a018d2c833188fb1e9ee7f902d5.tar.gz lumina-f8b26186ce5b6a018d2c833188fb1e9ee7f902d5.tar.bz2 lumina-f8b26186ce5b6a018d2c833188fb1e9ee7f902d5.zip |
Ensure that "Exec" and "TryExec" strings with quotes are handled properly.
Diffstat (limited to 'src-qt5/core/libLumina/LUtils.cpp')
-rw-r--r-- | src-qt5/core/libLumina/LUtils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/LUtils.cpp b/src-qt5/core/libLumina/LUtils.cpp index 820b55e8..65c6ac96 100644 --- a/src-qt5/core/libLumina/LUtils.cpp +++ b/src-qt5/core/libLumina/LUtils.cpp @@ -121,6 +121,9 @@ 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); } + //Now look for relative/absolute path if(!bin.startsWith("/")){ //Relative path: search for it on the current "PATH" settings QStringList paths = QString(qgetenv("PATH")).split(":"); |