From 1cc3d1a19ab1069242b67c7a4227d4ced44b1f74 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 27 Jun 2018 13:52:00 -0300 Subject: [PATCH] =?UTF-8?q?Corrige=20detec=C3=A7=C3=A3o=20.docx=20na=20exp?= =?UTF-8?q?orta=C3=A7=C3=A3o=20do=20zope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index 51be333af..bf71d051c 100755 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -79,7 +79,8 @@ def br(obj): def guess_extension(fullname, buffer): - mime = magic.from_buffer(buffer[:1024], mime=True) + # um corte de apenas 1024 impediu a detecção correta de .docx + mime = magic.from_buffer(buffer[:4096], mime=True) extensao = EXTENSOES.get(mime) if extensao is not None: return extensao