# HG changeset patch # User Kim Alvefur # Date 1511121643 -3600 # Node ID 469afa02947b0c5134bfd1fdcda380ae09a3e44e # Parent f1923a79c93d430cbb6678218befa87d2c28b720 mod_storage_internal: Skip write if no items matched a deletion query diff -r f1923a79c93d -r 469afa02947b plugins/mod_storage_internal.lua --- a/plugins/mod_storage_internal.lua Thu Nov 09 17:19:11 2017 +0100 +++ b/plugins/mod_storage_internal.lua Sun Nov 19 21:00:43 2017 +0100 @@ -209,6 +209,9 @@ end end local count = count_before - #items; + if count == 0 then + return 0; -- No changes, skip write + end local ok, err = datamanager.list_store(username, host, self.store, items); if not ok then return ok, err; end return count;