Commit 649d8e61 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fix test testSendZipFile. The zipfile should not be returned with the document

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@41904 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6eb152d3
......@@ -71,6 +71,7 @@ class FileSystemDocument(object):
open(file_path, 'wb').write(self.original_data)
# If is a zipfile is need extract all files from whitin the compressed file
if is_zipfile(file_path):
zip_path = file_path
zipfile = ZipFile(file_path)
zip_filename_list = zipfile.namelist()
if 'mimetype' not in zip_filename_list and \
......@@ -86,6 +87,7 @@ class FileSystemDocument(object):
if mimetypes.guess_type(filename)[0] in mimetype_list:
file_path = join(self.directory_name, filename)
break
remove(zip_path)
return file_path
def getContent(self, zip=False):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment