mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Don't load empty piecefields from sites.json
This commit is contained in:
parent
4a75d9d4f5
commit
b322b750c2
1 changed files with 2 additions and 1 deletions
|
@ -332,7 +332,8 @@ class SiteStoragePlugin(object):
|
|||
self.piecefields = collections.defaultdict(BigfilePiecefield)
|
||||
if "piecefields" in self.site.settings.get("cache", {}):
|
||||
for sha512, piecefield_packed in self.site.settings["cache"].get("piecefields").iteritems():
|
||||
self.piecefields[sha512].unpack(piecefield_packed.decode("base64"))
|
||||
if piecefield_packed:
|
||||
self.piecefields[sha512].unpack(piecefield_packed.decode("base64"))
|
||||
self.site.settings["cache"]["piecefields"] = {}
|
||||
|
||||
def createSparseFile(self, inner_path, size, sha512=None):
|
||||
|
|
Loading…
Reference in a new issue