Rev3158, Fix site clone with sites larger that 10MB

This commit is contained in:
shortcutme 2017-12-04 16:04:10 +01:00
parent 1208294747
commit 74e50e209a
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 7 additions and 2 deletions

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.6.0"
self.rev = 3157
self.rev = 3158
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"

View file

@ -599,11 +599,16 @@ class Site(object):
# Copy root content.json
if not new_site.storage.isFile("content.json") and not overwrite:
# Content.json not exist yet, create a new one from source site
# New site: Content.json not exist yet, create a new one from source site
if "size_limit" in self.settings:
new_site.settings["size_limit"] = self.settings["size_limit"]
# Use content.json-default is specified
if self.storage.isFile(root_inner_path + "/content.json-default"):
content_json = self.storage.loadJson(root_inner_path + "/content.json-default")
else:
content_json = self.storage.loadJson("content.json")
if "domain" in content_json:
del content_json["domain"]
content_json["title"] = "my" + content_json["title"]