Commit 8d08790c authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Save BM as zexp rather than a folder

parent 0d067945
This diff is collapsed.
...@@ -387,6 +387,9 @@ class TemplateTool (BaseTool): ...@@ -387,6 +387,9 @@ class TemplateTool (BaseTool):
id = self.generateNewId() id = self.generateNewId()
urltype, name = splittype(url) urltype, name = splittype(url)
# Create a zexp path which would be used for Business Manager files
zexp_path = name + '/' + name.split('/')[-1] + '.zexp'
if WIN and urltype and '\\' in name: if WIN and urltype and '\\' in name:
urltype = None urltype = None
name = url name = url
...@@ -398,10 +401,13 @@ class TemplateTool (BaseTool): ...@@ -398,10 +401,13 @@ class TemplateTool (BaseTool):
del bt.uid del bt.uid
return self[self._setObject(id, bt)] return self[self._setObject(id, bt)]
bt = self._download_url(url, id) bt = self._download_url(url, id)
elif os.path.exists(zexp_path):
# If the path exists, we create a Business Manager object after
# downloading it from zexp path
bt = self._download_local(os.path.normpath(zexp_path), id, format_version=3)
else: else:
template_version_path_list = [ template_version_path_list = [
name+'/bp/template_format_version', name+'/bp/template_format_version',
name+'/bm/template_format_version',
] ]
for path in template_version_path_list: for path in template_version_path_list:
......
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