aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@NewMachine.localdomain>2010-04-19 19:11:26 -0300
committerHisham Muhammad <hisham@NewMachine.localdomain>2010-04-19 19:11:26 -0300
commit940305da45e23d826100de6b32e5b0619aa1b5a0 (patch)
tree8a5df480d9a2d612db092265b2d743633c04f848 /src
parent9c501d767c285d9eee6b95c9c27666d3b1367183 (diff)
downloadluarocks-940305da45e23d826100de6b32e5b0619aa1b5a0.tar.gz
luarocks-940305da45e23d826100de6b32e5b0619aa1b5a0.tar.bz2
luarocks-940305da45e23d826100de6b32e5b0619aa1b5a0.zip
Properly handle source.url's where source.file is used to indicate the
actual filename of the file to be fetched (useful in downloads from github...)
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fetch.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua
index 073b14d1..3c2224f5 100644
--- a/src/luarocks/fetch.lua
+++ b/src/luarocks/fetch.lua
@@ -30,7 +30,7 @@ function fetch_url(url, filename)
30 if protocol == "file" then 30 if protocol == "file" then
31 return fs.absolute_name(pathname) 31 return fs.absolute_name(pathname)
32 elseif protocol == "http" or protocol == "ftp" or protocol == "https" then 32 elseif protocol == "http" or protocol == "ftp" or protocol == "https" then
33 local ok = fs.download(url) 33 local ok = fs.download(url, filename)
34 if not ok then 34 if not ok then
35 return nil, "Failed downloading "..url, "network" 35 return nil, "Failed downloading "..url, "network"
36 end 36 end