Skip to content

Commit

Permalink
fix chunked file uploads
Browse files Browse the repository at this point in the history
the new lz4 bindings return a memoryview,
which got mangled by strtobytes
  • Loading branch information
totaam committed Oct 16, 2022
1 parent ab33317 commit 4da5b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xpra/net/file_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from time import monotonic

from xpra.child_reaper import getChildReaper
from xpra.os_util import bytestostr, strtobytes, umask_context, POSIX, WIN32
from xpra.os_util import bytestostr, memoryview_to_bytes, umask_context, POSIX, WIN32
from xpra.util import typedict, csv, envint, envbool, engs, net_utf8, u
from xpra.scripts.config import parse_bool, parse_with_unit
from xpra.simple_stats import std_unit
Expand Down Expand Up @@ -342,7 +342,7 @@ def progress(position, error=None):
osclose(fd)
progress(-1, "chunk no mismatch")
return
file_data = strtobytes(file_data)
file_data = memoryview_to_bytes(file_data)
#update chunk number:
chunk_state[-1] = chunk
digest = chunk_state[8]
Expand Down

0 comments on commit 4da5b3b

Please sign in to comment.