From 7320b7ef654fc7c50e515b4730b0e0b5ce096aa7 Mon Sep 17 00:00:00 2001 From: Erik Osheim Date: Tue, 16 Mar 2010 21:04:18 -0400 Subject: [PATCH] fix AES-encrypted buffers --HG-- branch : pmacs2 --- buffer/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buffer/__init__.py b/buffer/__init__.py index d596e99..5189e22 100644 --- a/buffer/__init__.py +++ b/buffer/__init__.py @@ -639,6 +639,7 @@ class FileBuffer(Buffer): data = f.read() f.close() self.store_checksum(data) + data = self.read_filter(data) self.codec = chardet.detect(data)['encoding'].lower() else: data = '' @@ -654,8 +655,6 @@ class FileBuffer(Buffer): if '\t' in data: self.writetabs = True self.nl = self._detect_nl_type(data) - data = self.read_filter(data) - if '\x00' in data[:8192]: raise BinaryDataException("binary files are not supported")