aboutsummaryrefslogtreecommitdiff
path: root/lumina-open/main.cpp
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2016-03-11 11:23:42 -0500
committerKen Moore <moorekou@gmail.com>2016-03-11 11:23:42 -0500
commit5cca7eda2a00846ec4c6c7493b0c8046e4a67853 (patch)
treef1d5b0983d6fea2fca39b9e392176a84d49588fd /lumina-open/main.cpp
parentSignificant update to mime-type handling. (diff)
downloadlumina-5cca7eda2a00846ec4c6c7493b0c8046e4a67853.tar.gz
lumina-5cca7eda2a00846ec4c6c7493b0c8046e4a67853.tar.bz2
lumina-5cca7eda2a00846ec4c6c7493b0c8046e4a67853.zip
Fix up the detection of sloppy URL's (www.<something>) - treat them as http URL's.
Diffstat (limited to 'lumina-open/main.cpp')
-rw-r--r--lumina-open/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp
index dcec7269..a323e075 100644
--- a/lumina-open/main.cpp
+++ b/lumina-open/main.cpp
@@ -240,7 +240,8 @@ void getCMD(int argc, char ** argv, QString& binary, QString& args, QString& pat
else if(extension!="desktop"){ extension="mimetype"; } //flag to check for mimetype default based on file
}
else if(isUrl && inFile.startsWith("mailto:")){ extension = "email"; }
- else if(isUrl){ extension = "x-scheme-handler/"+inFile.section("://",0,0); } //webbrowser"; }
+ else if(isUrl && inFile.contains("://") ){ extension = "x-scheme-handler/"+inFile.section("://",0,0); }
+ else if(isUrl && inFile.startsWith("www.")){ extension = "x-scheme-handler/http"; inFile.prepend("http://"); } //this catches partial (but still valid) URL's ("www.<something>" for instance)
//qDebug() << "Input:" << inFile << isFile << isUrl << extension;
//if not an application - find the right application to open the file
QString cmd;
bgstack15