From d49ad30e1161d94d9c8ea23a974b468a55ab33e2 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Thu, 18 Oct 2018 10:42:24 -0300 Subject: [PATCH] Usa buffer inteiro p python-magic ao exportar do zope --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index 682296f4b..bec8595cf 100755 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -93,7 +93,7 @@ def br(obj): def guess_extension(fullname, buffer): # um corte de apenas 1024 impediu a detecção correta de .docx - mime = magic.from_buffer(buffer[:4096], mime=True) + mime = magic.from_buffer(buffer, mime=True) extensao = EXTENSOES.get(mime) if extensao is not None: return extensao