aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-12-02 08:34:58 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-12-02 08:34:58 +0000
commita70b48eec52d09f6d2fa395b21d7b902db255600 (patch)
treecc867017fa760e99ce2a79d1bc7cc1c471aca562 /lualib
parentee81bd5e37e63e566ff37a85df1f501043fc3203 (diff)
downloadrspamd-a70b48eec52d09f6d2fa395b21d7b902db255600.tar.gz
rspamd-a70b48eec52d09f6d2fa395b21d7b902db255600.zip
[Minor] Fix text operation
Diffstat (limited to 'lualib')
-rw-r--r--lualib/rspamadm/mime.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua
index c8b1f8450..2870ca371 100644
--- a/lualib/rspamadm/mime.lua
+++ b/lualib/rspamadm/mime.lua
@@ -727,20 +727,27 @@ local function modify_handler(opts)
out[#out + 1] = o
end
else
- out[#out + 1] = task:get_rawbody()
+ out[#out + 1] = {task:get_rawbody(), false}
end
for _,o in ipairs(out) do
if type(o) == 'string' then
io.write(o)
io.write(newline_s)
- else
+ elseif type(o) == 'table' then
io.flush()
- o[1]:save_in_file(1)
+ if type(o[1]) == 'string' then
+ io.write(o[1])
+ else
+ o[1]:save_in_file(1)
+ end
if o[2] then
io.write(newline_s)
end
+ else
+ o:save_in_file(1)
+ io.write(newline_s)
end
end