From 31ef18cb1cae2fa960b7d6655c22408d5d277f47 Mon Sep 17 00:00:00 2001 From: Karl Semich <0xloem@gmail.com> Date: Sat, 11 Jun 2016 06:56:37 -0400 Subject: bugfixes with update --- backend/resilient/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'backend') 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 -- cgit v1.2.3