Fix sync for windows users

sammachin-gprs
Marek Ventur 2018-09-01 18:12:37 +01:00
parent 15de09127c
commit aa6a80c269
1 changed files with 2 additions and 0 deletions

View File

@ -185,6 +185,8 @@ def write_via_repl(args, content, rel_path):
h = hashlib.sha256()
h.update(content)
content = binascii.b2a_base64(content).decode('ascii').strip()
if os.sep != '/':
rel_path = rel_path.replace(os.sep, '/')
rel_path_as_string = json.dumps(rel_path) # make sure quotes are escaped
cmd = "h(%s)" % rel_path_as_string
badge_hash = returnbuffer(pyb,cmd).splitlines()[0]