fix AES-encrypted buffers

--HG--
branch : pmacs2
This commit is contained in:
Erik Osheim 2010-03-16 21:04:18 -04:00
parent c47fca63d6
commit 7320b7ef65
1 changed files with 1 additions and 2 deletions

View File

@ -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")