summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorKarl Semich <0xloem@gmail.com>2016-06-11 06:56:37 -0400
committerKarl Semich <0xloem@gmail.com>2016-06-11 06:56:37 -0400
commit31ef18cb1cae2fa960b7d6655c22408d5d277f47 (patch)
treef97313c8be8cef17fdac9e410f7c4c0cb18a6a51 /backend
parentf12a5846086bb8c3e27a813bde626e818c5d6005 (diff)
downloadstandingwithresilience-31ef18cb1cae2fa960b7d6655c22408d5d277f47.tar.gz
standingwithresilience-31ef18cb1cae2fa960b7d6655c22408d5d277f47.zip
bugfixes with update
Diffstat (limited to 'backend')
-rw-r--r--backend/resilient/__init__.py9
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