mirror of https://github.com/octoleo/lsyncd.git
another obscure event turned up by churn tests
do not collapse create upon delete into a create if its a directory so subcontents get deleted.
This commit is contained in:
parent
0025a16f51
commit
15cde269c4
17
lsyncd.lua
17
lsyncd.lua
|
@ -243,6 +243,21 @@ local Combiner = (function()
|
||||||
return "absorb"
|
return "absorb"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
----
|
||||||
|
-- new delay replaces the old one if it is a file
|
||||||
|
--
|
||||||
|
local function refi(d1, d2)
|
||||||
|
if d2.path:byte(-1) == 47 then
|
||||||
|
log("Delay",d2.etype,":",d2.path," blocked by ",
|
||||||
|
d1.etype,":",d1.path)
|
||||||
|
return "stack"
|
||||||
|
end
|
||||||
|
log("Delay",d2.etype,":",d2.path," replaces ",
|
||||||
|
d1.etype,":",d1.path)
|
||||||
|
return "replace"
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
----
|
----
|
||||||
-- new delay replaces the old one
|
-- new delay replaces the old one
|
||||||
--
|
--
|
||||||
|
@ -268,7 +283,7 @@ local Combiner = (function()
|
||||||
Attrib = {Attrib=abso, Modify=repl, Create=repl, Delete=repl },
|
Attrib = {Attrib=abso, Modify=repl, Create=repl, Delete=repl },
|
||||||
Modify = {Attrib=abso, Modify=abso, Create=repl, Delete=repl },
|
Modify = {Attrib=abso, Modify=abso, Create=repl, Delete=repl },
|
||||||
Create = {Attrib=abso, Modify=abso, Create=abso, Delete=repl },
|
Create = {Attrib=abso, Modify=abso, Create=abso, Delete=repl },
|
||||||
Delete = {Attrib=abso, Modify=abso, Create=repl, Delete=abso },
|
Delete = {Attrib=abso, Modify=abso, Create=refi, Delete=abso },
|
||||||
}
|
}
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
Loading…
Reference in New Issue