diff options
author | Kim Alvefur <zash@zash.se> | 2018-08-04 15:44:38 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-08-04 15:44:38 +0200 |
commit | 5a4e252a6ce14abba2da8bb7ac5c23b0a369d2cb (patch) | |
tree | 5cbdb660e26be32a793bcd9c2d8f47808b86a7cf /plugins/mod_storage_internal.lua | |
parent | 31e2ba5f995d7fa9327c975d55a94b8efd438b09 (diff) | |
download | prosody-5a4e252a6ce14abba2da8bb7ac5c23b0a369d2cb.tar.gz prosody-5a4e252a6ce14abba2da8bb7ac5c23b0a369d2cb.zip |
mod_storage_internal: Only apply truncate if there are more items than requested
Diffstat (limited to 'plugins/mod_storage_internal.lua')
-rw-r--r-- | plugins/mod_storage_internal.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_internal.lua b/plugins/mod_storage_internal.lua index 27bd8830..42b451bd 100644 --- a/plugins/mod_storage_internal.lua +++ b/plugins/mod_storage_internal.lua @@ -191,7 +191,7 @@ function archive:delete(username, query) return item.when > query["end"]; end); end - if query.truncate then + if query.truncate and #items > query.truncate then if query.reverse then -- Before: { 1, 2, 3, 4, 5, } -- After: { 1, 2, 3 } |