mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-08 17:24:06 +00:00
fixing excludes
This commit is contained in:
parent
6c1a3edeb0
commit
1a1391dbc5
@ -1082,17 +1082,17 @@ local Excludes = (function()
|
|||||||
if p:byte(-1) == 36 then
|
if p:byte(-1) == 36 then
|
||||||
-- ends with $
|
-- ends with $
|
||||||
if path:match(p) then
|
if path:match(p) then
|
||||||
log("Exclude", "'",path,"' matches '",p,"' (1)")
|
--log("Exclude", "'",path,"' matches '",p,"' (1)")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- end either end with / or $
|
-- end either end with / or $
|
||||||
if path:match(p.."/") or path:match(p.."$") then
|
if path:match(p.."/") or path:match(p.."$") then
|
||||||
log("Exclude", "'",path,"' matches '",p,"' (2)")
|
--log("Exclude", "'",path,"' matches '",p,"' (2)")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
log("Exclude", "'",path,"' NOT matches '",p,"'")
|
--log("Exclude", "'",path,"' NOT matches '",p,"'")
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@ -3247,7 +3247,6 @@ local default_rsyncssh = {
|
|||||||
elist, "/usr/bin/rsync",
|
elist, "/usr/bin/rsync",
|
||||||
"<", zPaths,
|
"<", zPaths,
|
||||||
config.rsyncOps,
|
config.rsyncOps,
|
||||||
"-r",
|
|
||||||
"--from0",
|
"--from0",
|
||||||
"--files-from=-",
|
"--files-from=-",
|
||||||
config.source,
|
config.source,
|
||||||
|
@ -5,10 +5,11 @@
|
|||||||
require("posix")
|
require("posix")
|
||||||
dofile("tests/testlib.lua")
|
dofile("tests/testlib.lua")
|
||||||
|
|
||||||
cwriteln("****************************************************************")
|
cwriteln("****************************************************************");
|
||||||
cwriteln(" Testing default.rsyncssh with random data activity ")
|
cwriteln(" Testing default.rsyncssh with random data activity ");
|
||||||
cwriteln("****************************************************************")
|
cwriteln("****************************************************************");
|
||||||
cwriteln("(This test needs passwordless localhost access of current user)");
|
cwriteln(" (this test needs passwordless ssh localhost access ");
|
||||||
|
cwriteln(" for current user)");
|
||||||
|
|
||||||
local tdir, srcdir, trgdir = mktemps()
|
local tdir, srcdir, trgdir = mktemps()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user