diff --git a/src/var/lib/tyto/program/publish.py b/src/var/lib/tyto/program/publish.py index e5407a8..e6887d1 100644 --- a/src/var/lib/tyto/program/publish.py +++ b/src/var/lib/tyto/program/publish.py @@ -162,9 +162,14 @@ def create_template(option): item_src = '%s%s'%(db.srv_wip_tpl, item) item_dst = '%s%s'%(db.srv_www_tpl, item) - if shutil.copy2(item_src, item_dst): + if os.path.isdir(item_src): + shutil.copytree(item_src, item_dst) + print(' ├ Create dir :', item_dst) + else: + shutil.copy2(item_src, item_dst) print(' ├ Create file:', item_dst) + #================================# # Publish template in www server # #--------------------------------#