diff --git a/adb_shell/adb_device.py b/adb_shell/adb_device.py index 8a23dd9..c295028 100644 --- a/adb_shell/adb_device.py +++ b/adb_shell/adb_device.py @@ -1590,7 +1590,7 @@ def _filesync_send(self, command_id, adb_info, filesync_info, data=b"", size=Non self._filesync_flush(adb_info, filesync_info) buf = struct.pack(b"<2I", constants.FILESYNC_ID_TO_WIRE[command_id], size) + data - filesync_info.send_buffer[filesync_info.send_idx : filesync_info.send_idx + len(buf)] = buf + filesync_info.send_buffer[filesync_info.send_idx : filesync_info.send_idx + len(buf)] = buf # noqa filesync_info.send_idx += len(buf) diff --git a/adb_shell/adb_device_async.py b/adb_shell/adb_device_async.py index 9f55e60..c44987b 100644 --- a/adb_shell/adb_device_async.py +++ b/adb_shell/adb_device_async.py @@ -1650,7 +1650,7 @@ async def _filesync_send(self, command_id, adb_info, filesync_info, data=b"", si await self._filesync_flush(adb_info, filesync_info) buf = struct.pack(b"<2I", constants.FILESYNC_ID_TO_WIRE[command_id], size) + data - filesync_info.send_buffer[filesync_info.send_idx : filesync_info.send_idx + len(buf)] = buf + filesync_info.send_buffer[filesync_info.send_idx : filesync_info.send_idx + len(buf)] = buf # noqa filesync_info.send_idx += len(buf)