Commit 7c9c483c authored by Romain Courteaud's avatar Romain Courteaud

Buf fix: it is better to change the working directory.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4323 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 089aed7b
......@@ -136,10 +136,13 @@ class TemplateTool (BaseTool):
"""
Export BT in tarball format
"""
path = business_template.getTitle()
tmpfile_path = os.tmpnam()
tmpdir_path = os.path.dirname(tmpfile_path)
path = os.path.join(tmpdir_path, business_template.getTitle())
current_directory = os.getcwd()
os.chdir(tmpdir_path)
export_string = business_template.export(path=path)
os.chdir(current_directory)
if RESPONSE is not None:
RESPONSE.setHeader('Content-type','tar/x-gzip')
RESPONSE.setHeader('Content-Disposition',
......
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