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:
Axel Kittenberger 2010-11-29 00:12:55 +00:00
parent 0025a16f51
commit 15cde269c4
1 changed files with 16 additions and 1 deletions

View File

@ -243,6 +243,21 @@ local Combiner = (function()
return "absorb"
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
--
@ -268,7 +283,7 @@ local Combiner = (function()
Attrib = {Attrib=abso, Modify=repl, Create=repl, Delete=repl },
Modify = {Attrib=abso, Modify=abso, Create=repl, 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 },
}
------