From 6400d3b0f3576ca3bc1278fe6706d7de7fffe1fe Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 15 Mar 2013 11:55:04 +0200 Subject: fixed bug in conflict detection: update parent's timestamp when creating/deleting subordinate --- acf/transaction/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'acf') diff --git a/acf/transaction/init.lua b/acf/transaction/init.lua index e9b8bbc..003abdb 100644 --- a/acf/transaction/init.lua +++ b/acf/transaction/init.lua @@ -110,12 +110,17 @@ function Transaction:set_multiple(mods) if is_table then value = {} end set(path, not delete and t or nil, value, old == nil) + local function set_parent() + set(ppath, 'table', parent) + self.mod_time[ppath] = self.mod_time[path] + end + if old == nil and not delete then table.insert(parent, name) - set(ppath, 'table', parent) + set_parent() elseif old ~= nil and delete then remove_list_value(parent, name) - set(ppath, 'table', parent) + set_parent() end end end -- cgit v1.2.3