diff --git a/src/Config.py b/src/Config.py index 33b368c3..1d5d0eba 100644 --- a/src/Config.py +++ b/src/Config.py @@ -10,7 +10,7 @@ class Config(object): def __init__(self, argv): self.version = "0.6.0" - self.rev = 3146 + self.rev = 3148 self.argv = argv self.action = None self.config_file = "zeronet.conf" diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 732026c6..1b5d9b7c 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -732,6 +732,10 @@ class ContentManager(object): old_content_size = 0 old_content_size_optional = 0 + # Reset site site on first content.json + if not old_content and inner_path == "content.json": + self.site.settings["size"] = 0 + content_size_optional = sum([file["size"] for file in content.get("files_optional", {}).values() if file["size"] >= 0]) site_size = self.site.settings["size"] - old_content_size + content_size # Site size without old content plus the new site_size_optional = self.site.settings["size_optional"] - old_content_size_optional + content_size_optional # Site size without old content plus the new