1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-01-04 01:19:27 +01:00

- [GUI] added a workaround to deal with URI that have no path component (thanks op!).

This commit is contained in:
cage 2023-05-18 17:45:35 +02:00
parent f495f41197
commit ad06c1b231

View File

@ -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+))