diff options
Diffstat (limited to 'backend/resilient')
-rw-r--r-- | backend/resilient/__init__.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/backend/resilient/__init__.py b/backend/resilient/__init__.py index 135c47d..4c89074 100644 --- a/backend/resilient/__init__.py +++ b/backend/resilient/__init__.py @@ -81,7 +81,12 @@ class ikiwiki: html_git_path = os.path.join(html_path, '.git') os.mkdir(html_git_path) for path in ['objects', 'refs', 'HEAD', 'info', 'packed-refs']: - shutil.copytree(os.path.join(git_path, path), os.path.join(html_git_path, path)) + git_subpath = os.path.join(git_path, path) + html_git_subpath = os.path.join(html_git_path, path) + if os.path.isdir(git_subpath): + shutil.copytree(git_subpath, html_git_subpath) + else: + shutil.copy2(git_subpath, html_git_subpath) return ikiwiki.synced @@ -108,8 +113,6 @@ class zeronet: zitedir = os.path.join(zeronet.zn_datadir, self.addr) shutil.rmtree(zitedir, True) shutil.copytree(html_path, zitedir) - if status != 0: - return False status = os.system('%s siteSign %s %s' % (zeronet.zn_script, self.addr, self.key)) return status == 0 |