From ac7a3a999286bddd9ab83754fc0e25df0a926493 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 23 Apr 2005 21:36:27 +0000 Subject: [PATCH 1/1] =?utf8?q?Bugfix=20(si=20un=20archivo=20ven=C3=ADa=20v?= =?utf8?q?aci=C3=B3,=20tomaba=20que=20como=20no=20grababa=20ning=C3=BAn=20?= =?utf8?q?byte,=20hab=C3=ADa=20un=20error).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/sc_fetch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sc_fetch b/src/sc_fetch index 9f14318..6a78b6d 100755 --- a/src/sc_fetch +++ b/src/sc_fetch @@ -201,8 +201,8 @@ function preparar_entrega($intento, $mbox, $msgid, $dir) { $fname = part_filename($part); if ($fname) { logs("Escribiendo archivo '$fname' [enc={$part->encoding}]", DEBUG); - $body = imap_fetchbody($mbox, $msgid, $id + 1); - if (!file_put_contents("$path/$fname", decode_body($body, $part->encoding))) return "Error al guardar el archivo $fname"; + $body = decode_body(imap_fetchbody($mbox, $msgid, $id + 1), $part->encoding); + if (!file_put_contents("$path/$fname", $body) and $body) return "Error al guardar el archivo $fname"; } //if (part_is_source($part) $has_sources = true; //elseif (part_mime_type($part) == 'application/zip') $has_sources = true; -- 2.43.0