]> gitweb.factorcode.org Git - factor.git/commitdiff
http.download: download to cwd like the docs say not "resource:"
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 15 Apr 2024 18:43:10 +0000 (13:43 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 15 Apr 2024 18:43:54 +0000 (13:43 -0500)
basis/http/download/download.factor

index 0ac7f7e42dbb75666752667b6999db81e6239cce..ee464b9afcdf0320c6ae31b05a5f0e1a30d52b8e 100644 (file)
@@ -3,8 +3,8 @@
 USING: accessors calendar checksums combinators.short-circuit
 http.client io io.directories io.encodings.binary io.files
 io.files.info io.files.unique io.pathnames kernel math
-math.order math.parser present sequences shuffle splitting ;
-
+math.order math.parser namespaces present sequences shuffle
+splitting ;
 IN: http.download
 
 : file-too-old-or-not-exists? ( path duration -- ? )
@@ -104,7 +104,7 @@ PRIVATE>
 
 : download-once-into ( url directory -- path ) to-directory download-once-as ;
 
-: download-once ( url -- path ) "resource:" download-once-into ;
+: download-once ( url -- path ) current-directory get download-once-into ;
 
 : download-outdated-as ( url path duration -- path' )
     2dup delete-when-old [ drop download-as ] [ drop nip ] if ;
@@ -113,4 +113,4 @@ PRIVATE>
     [ to-directory ] dip download-outdated-as ;
 
 : download-outdated ( url duration -- path )
-    [ dup download-name "resource:" to-directory nip ] dip download-outdated-as ;
+    [ dup download-name current-directory get to-directory nip ] dip download-outdated-as ;