diff --git a/src/gui/client/main-window.lisp b/src/gui/client/main-window.lisp index 3cdb47c..f4d8ad5 100644 --- a/src/gui/client/main-window.lisp +++ b/src/gui/client/main-window.lisp @@ -735,6 +735,13 @@ (clean-gemtext main-window) (collect-ir-lines links-path-prefix gui-goodies:*main-frame* parsed-lines))) +(defun iri-ensure-path (iri) + (let ((parsed (iri:iri-parse iri :null-on-error t))) + (if (and parsed + (null (uri:path parsed))) + (strcat iri "/") + iri))) + (defun open-iri (iri main-window use-cache &key (status +stream-status-streaming+)) (handler-case (let ((parsed-iri (iri:iri-parse iri))) @@ -745,7 +752,10 @@ ((iri:iri= iri (internal-iri-gemlogs)) (menu:manage-gemlogs)) ((gemini-parser:gemini-iri-p iri) - (start-stream-iri iri main-window use-cache status)) + (start-stream-iri (iri-ensure-path iri) + main-window + use-cache + status)) ((or (null (uri:scheme parsed-iri)) (string= (uri:scheme parsed-iri) constants:+file-scheme+))