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:
parent
f495f41197
commit
ad06c1b231
@ -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+))
|
||||
|
Loading…
Reference in New Issue
Block a user