fixed exclude param

This commit is contained in:
Axel Kittenberger 2010-12-03 21:16:39 +00:00
parent 07e35ffe60
commit f6182cb9f6
1 changed files with 10 additions and 3 deletions

View File

@ -919,7 +919,7 @@ local Excludes = (function()
-- Adds a list of patterns to exclude.
--
local function addList(self, plist)
for _, v in plist do
for _, v in ipairs(plist) do
add(self, v)
end
end
@ -966,7 +966,7 @@ local Excludes = (function()
-- functions
add = add,
adList = addList,
addList = addList,
loadFile = loadFile,
remove = remove,
test = test,
@ -1413,7 +1413,14 @@ local Sync = (function()
-- loads exclusions
if config.exclude then
s.excludes:addList(config.exclude)
local te = type(config.exclude)
if te == "table" then
s.excludes:addList(config.exclude)
elseif te == "string" then
s.excludes:add(config.exclude)
else
error("type for exclude must be table or string", 2)
end
end
if config.excludeFrom then
s.excludes:loadFile(config.excludeFrom)