diff options
author | Ken Moore <ken@pcbsd.org> | 2014-11-14 10:42:17 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-11-14 10:42:17 -0500 |
commit | ed01ba9d851199d7e6485555c4ec27f5fba09961 (patch) | |
tree | bc1388332adf9ba45da655371424acf295636649 | |
parent | Increase the transparency of the notepad desktop plugin background. (diff) | |
download | lumina-ed01ba9d851199d7e6485555c4ec27f5fba09961.tar.gz lumina-ed01ba9d851199d7e6485555c4ec27f5fba09961.tar.bz2 lumina-ed01ba9d851199d7e6485555c4ec27f5fba09961.zip |
Add detection/conversion of relative file paths to absolute file paths within lumina-open (prevent miscategorization of files as URLs within the algorithm as well).
-rw-r--r-- | lumina-open/main.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp index f3695085..c3fb5c49 100644 --- a/lumina-open/main.cpp +++ b/lumina-open/main.cpp @@ -194,6 +194,7 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat //Make sure that it is a valid file/URL bool isFile=false; bool isUrl=false; if(QFile::exists(inFile)){ isFile=true; } + else if(QFile::exists(QDir::currentPath()+"/"+inFile)){isFile=true; inFile = QDir::currentPath()+"/"+inFile;} //account for relative paths else if(QUrl(inFile).isValid() && !inFile.startsWith("/") ){ isUrl=true; } if( !isFile && !isUrl ){ qDebug() << "Error: Invalid file or URL"; return;} //Determing the type of file (extension) |