From 038bf4f2c84d3071285ad1479b81d2e2b85faef2 Mon Sep 17 00:00:00 2001 From: HelloZeroNet Date: Mon, 25 Apr 2016 02:26:13 +0200 Subject: [PATCH] Dont add -old postfix for content.json files --- src/Ui/UiWebsocket.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Ui/UiWebsocket.py b/src/Ui/UiWebsocket.py index 6a448bb7..3d719c50 100644 --- a/src/Ui/UiWebsocket.py +++ b/src/Ui/UiWebsocket.py @@ -301,6 +301,7 @@ class UiWebsocket(object): return site.content_manager.loadContent(inner_path, add_bad_files=False) # Load new content.json, ignore errors + if response_ok: self.response(to, "ok") @@ -383,7 +384,10 @@ class UiWebsocket(object): import base64 content = base64.b64decode(content_base64) # Save old file to generate patch later - if inner_path.endswith(".json") and self.site.storage.isFile(inner_path) and not self.site.storage.isFile(inner_path + "-old"): + if ( + inner_path.endswith(".json") and not inner_path.endswith("content.json") and + self.site.storage.isFile(inner_path) and not self.site.storage.isFile(inner_path + "-old") + ): try: self.site.storage.rename(inner_path, inner_path + "-old") except Exception: