Commit d7f64d17 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Only import the BusinessItem which matches the path

parent e00eec68
......@@ -1334,6 +1334,11 @@ class BusinessManagerFolder(BusinessManagerArchive):
try:
for root, dirs, files in os.walk(root):
for file_name in files:
# If the item name is Business Item, then only import the files which
# mattter for this Business Item
if item_name == 'BusinessItem':
if not fnmatch.fnmatch(file_name, '%s.*' % item._path.split('/')[-1]):
continue
file_name = join(root, file_name)
with open(file_name, 'rb') as f:
file_name = posixpath.normpath(file_name[root_path_len:])
......
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