diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-10-11 02:03:52 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-10-11 02:03:52 -0300 |
commit | 8728bd989c646d3e36ed68a0196a93dd21287dd5 (patch) | |
tree | 3d63f7466729cd9fa6802b10560a74756c09cc55 | |
parent | 3ad2f62adce549504375b6b7d8fb03190297ae6b (diff) | |
download | luarocks-8728bd989c646d3e36ed68a0196a93dd21287dd5.tar.gz luarocks-8728bd989c646d3e36ed68a0196a93dd21287dd5.tar.bz2 luarocks-8728bd989c646d3e36ed68a0196a93dd21287dd5.zip |
switch from pattern to plain string matching, to avoid surprises
-rw-r--r-- | src/luarocks/fetch.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index 874dc33f..80ca4400 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua | |||
@@ -313,10 +313,9 @@ function fetch_sources(rockspec, extract, dest_dir) | |||
313 | and #rockspec.source.pathname > 0 then | 313 | and #rockspec.source.pathname > 0 then |
314 | if #cfg.only_sources_from == 0 then | 314 | if #cfg.only_sources_from == 0 then |
315 | return nil, "Can't download "..rockspec.source.url.." -- download from remote servers disabled" | 315 | return nil, "Can't download "..rockspec.source.url.." -- download from remote servers disabled" |
316 | elseif not rockspec.source.pathname:match("^"..cfg.only_sources_from) then | 316 | elseif rockspec.source.pathname:find(cfg.only_sources_from, 1, true) ~= 1 then |
317 | return nil, "Can't download "..rockspec.source.url.." -- only downloading from "..cfg.only_sources_from | 317 | return nil, "Can't download "..rockspec.source.url.." -- only downloading from "..cfg.only_sources_from |
318 | end | 318 | end |
319 | end | 319 | end |
320 | |||
321 | return proto.get_sources(rockspec, extract, dest_dir) | 320 | return proto.get_sources(rockspec, extract, dest_dir) |
322 | end | 321 | end |