Commit 35882f70 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Avoid .svn.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6003 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 729c63ce
...@@ -266,6 +266,8 @@ class BusinessTemplateTarball(BusinessTemplateArchive): ...@@ -266,6 +266,8 @@ class BusinessTemplateTarball(BusinessTemplateArchive):
for info in tar.getmembers(): for info in tar.getmembers():
if 'CVS' in info.name.split('/'): if 'CVS' in info.name.split('/'):
continue continue
if '.svn' in info.name.split('/'):
continue
if class_name in info.name.split('/'): if class_name in info.name.split('/'):
if info.isreg(): if info.isreg():
file = tar.extractfile(info) file = tar.extractfile(info)
......
...@@ -260,11 +260,11 @@ class TemplateTool (BaseTool): ...@@ -260,11 +260,11 @@ class TemplateTool (BaseTool):
if os.path.isdir(name): # new version of business template in plain format (folder) if os.path.isdir(name): # new version of business template in plain format (folder)
file_list = [] file_list = []
def callback(arg, directory, files): def callback(arg, directory, files):
if 'CVS' not in directory: if 'CVS' not in directory and '.svn' not in directory:
for file in files: for file in files:
file_list.append(os.path.join(directory, file)) file_list.append(os.path.join(directory, file))
os.path.walk(name, callback, None) os.path.walk(name, callback, None)
file_list.sort() file_list.sort()
# import bt object # import bt object
bt = self.newContent(portal_type='Business Template', id=id) bt = self.newContent(portal_type='Business Template', id=id)
......
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