Mark site with has_bigfile if new bigfile found

This commit is contained in:
shortcutme 2018-03-29 03:16:47 +02:00
parent 5c644d1b36
commit b8d83c7ec4
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -432,6 +432,8 @@ class SiteStoragePlugin(object):
file_info = self.site.content_manager.getFileInfo(inner_path)
if not file_info or (file_info and "piecemap" not in file_info): # It's not a big file
return False
self.site.settings["has_bigfile"] = True
file_path = self.getPath(inner_path)
sha512 = file_info["sha512"]
piece_num = int(math.ceil(float(file_info["size"]) / file_info["piece_size"]))