]> gitweb.factorcode.org Git - factor.git/commitdiff
gemini: fix path handling.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Mar 2021 23:22:58 +0000 (15:22 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 11 Mar 2021 23:22:58 +0000 (15:22 -0800)
extra/gemini/gemini.factor
extra/gemini/ui/ui.factor

index f326b8b2fb1ddab01d8522e7abcbe10384430297..b50bee2441bd3b2826fce3242e8c5d97be8836b3 100644 (file)
@@ -2,9 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license
 
 USING: accessors ascii colors.constants continuations io
-io.encodings.utf8 io.sockets io.sockets.secure io.styles kernel
-make present sequences sequences.extras splitting urls
-wrap.strings ;
+io.encodings.utf8 io.pathnames io.sockets io.sockets.secure
+io.styles kernel make present sequences sequences.extras
+splitting urls wrap.strings ;
 
 IN: gemini
 
@@ -85,7 +85,7 @@ PRIVATE>
             "://" over subseq? [
                 >url
             ] [
-                url clone swap >>path f >>query f >>anchor
+                url clone swap '[ _ append-path ] change-path f >>query f >>anchor
             ] if [
                 presented ,,
                 COLOR: blue foreground ,,
index 340178105a5034f62c03b4f982d4dfb49a8ecfea..a3f8cdb1f7afa5df0856ed590b184f9f6d3da3ec 100644 (file)
@@ -83,7 +83,7 @@ M: gemini-gadget model-changed
         control-value dup [
             f >>query
             f >>anchor
-            [ "/" ?tail drop "/" split1-last drop ] change-path
+            [ "/" ?tail drop "/" split1-last drop "/" append ] change-path
         ] when
     ]
     [ show-gemini ] bi ;