Rev1762, Fix binary files corruption with new updated

This commit is contained in:
shortcutme 2016-12-04 21:36:52 +01:00
parent b66317fa7d
commit f1f12ee8bd
2 changed files with 3 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class Config(object):
def __init__(self, argv): def __init__(self, argv):
self.version = "0.5.1" self.version = "0.5.1"
self.rev = 1761 self.rev = 1762
self.argv = argv self.argv = argv
self.action = None self.action = None
self.config_file = "zeronet.conf" self.config_file = "zeronet.conf"

View file

@ -11,6 +11,7 @@ import cStringIO as StringIO
from gevent import monkey from gevent import monkey
monkey.patch_all() monkey.patch_all()
def download(): def download():
from src.util import helper from src.util import helper
@ -108,7 +109,7 @@ def update():
if zipdata: if zipdata:
data = zipdata.read(inner_path) data = zipdata.read(inner_path)
else: else:
data = open(updatesite_path + "/" + inner_path).read() data = open(updatesite_path + "/" + inner_path, "rb").read()
try: try:
open(dest_path, 'wb').write(data) open(dest_path, 'wb').write(data)