summaryrefslogtreecommitdiffstats
path: root/acf
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-03-15 11:55:04 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2013-03-15 11:55:04 +0200
commit6400d3b0f3576ca3bc1278fe6706d7de7fffe1fe (patch)
tree7974d6a0ae0a5d26011dcaf7896940f95bf88464 /acf
parentc72a57b99c93a14cdf924771455a74aa358227c6 (diff)
downloadaconf-6400d3b0f3576ca3bc1278fe6706d7de7fffe1fe.tar.bz2
aconf-6400d3b0f3576ca3bc1278fe6706d7de7fffe1fe.tar.xz
fixed bug in conflict detection: update parent's timestamp when creating/deleting subordinate
Diffstat (limited to 'acf')
-rw-r--r--acf/transaction/init.lua9
1 files changed, 7 insertions, 2 deletions
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