Rev2127, Fix delete files without file_info
This commit is contained in:
parent
401d3ec1c9
commit
03cabcb07c
2 changed files with 2 additions and 2 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.5.6"
|
||||
self.rev = 2125
|
||||
self.rev = 2127
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -533,7 +533,7 @@ class UiWebsocket(object):
|
|||
return self.response(to, {"error": "Forbidden, you can only modify your own files"})
|
||||
|
||||
file_info = self.site.content_manager.getFileInfo(inner_path)
|
||||
if file_info.get("optional"):
|
||||
if file_info and file_info.get("optional"):
|
||||
self.log.debug("Deleting optional file: %s" % inner_path)
|
||||
relative_path = file_info["relative_path"]
|
||||
content_json = self.site.storage.loadJson(file_info["content_inner_path"])
|
||||
|
|
Loading…
Reference in a new issue