Commit 5eb0e423 authored by Alexandre Boeglin's avatar Alexandre Boeglin

bugfix in tgz import: handle file path starting with "./"


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5146 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b3b9f93
......@@ -230,7 +230,9 @@ class BusinessTemplateTarball(BusinessTemplateArchive):
if class_name in info.name.split('/'):
if info.isreg():
file = tar.extractfile(info)
folders = string.split(info.name, os.sep)
tar_file_name = info.name.startswith('./') and info.name[2:] or \
info.name
folders = string.split(tar_file_name, os.sep)
file_name = (os.sep).join(folders[2:])
if '%' in file_name:
file_name = url2pathname(file_name)
......
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