diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-05-30 21:36:22 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-05-30 21:36:22 +0000 |
commit | 5ca1049ab47f3f9ff9157f71af9072f04a637500 (patch) | |
tree | 24fcb14f2890900a4a709312ab25bfc2c14a3939 /etc | |
parent | c23240726e3044e3eaa32a82a999b754c08bc183 (diff) | |
download | luasocket-5ca1049ab47f3f9ff9157f71af9072f04a637500.tar.gz luasocket-5ca1049ab47f3f9ff9157f71af9072f04a637500.tar.bz2 luasocket-5ca1049ab47f3f9ff9157f71af9072f04a637500.zip |
Fine tuning the "require" business.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/get.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/get.lua b/etc/get.lua index cc270e8..35de7d7 100644 --- a/etc/get.lua +++ b/etc/get.lua | |||
@@ -106,7 +106,10 @@ function getbyftp(url, file) | |||
106 | -- only print feedback if output is not stdout | 106 | -- only print feedback if output is not stdout |
107 | -- and we don't know how big the file is | 107 | -- and we don't know how big the file is |
108 | if file then save = ltn12.sink.chain(stats(), save) end | 108 | if file then save = ltn12.sink.chain(stats(), save) end |
109 | local ret, err = socket.ftp.get {url = url, sink = save, type = "i"} | 109 | local gett = socket.url.parse(url) |
110 | gett.sink = save | ||
111 | gett.type = "i" | ||
112 | local ret, err = socket.ftp.get(gett) | ||
110 | if err then print(err) end | 113 | if err then print(err) end |
111 | end | 114 | end |
112 | 115 | ||