aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 46bc7e9..5939940 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -274,6 +274,13 @@ int main(int argc, char *argv[])
if(urls.size() > 0) {
for(auto url_str : urls) {
QUrl url { url_str };
+ if (url.isRelative()) {
+ if (QFile::exists(url_str)) {
+ url = QUrl::fromLocalFile(QFileInfo(url_str).absoluteFilePath());
+ } else {
+ url = QUrl("gemini://" + url_str);
+ }
+ }
if(url.isValid()) {
w.addNewTab(false, url);
} else {