We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sz一个无权限的文件后,再输入其他字符时,显示有点异常。比如说我输入了5个字符,终端页面只会展示2个。
The text was updated successfully, but these errors were encountered:
找到问题了。是zmodem协议上未处理abort sequence: class ZModemAbortSequence implements ZModemPacket { const ZModemAbortSequence();
static final abortSequence = Uint8List.fromList([ consts.CAN, consts.CAN, consts.CAN, consts.CAN, consts.CAN, ]);
@OverRide Uint8List encode() { return abortSequence; } }
Sorry, something went wrong.
参考处理方式: 修改zmodem模块
bool _findSubSeq(Uint8List origin, Uint8List subSeq) { // 如果 b 是空数组,直接返回 true if (subSeq.isEmpty) return true; // 如果 a 的长度小于 b 的长度,直接返回 false if (origin.length < subSeq.length) return false; // 遍历 a 数组,检查是否存在连续的子序列与 b 相等 for (int i = 0; i <= origin.length - subSeq.length; i++) { bool match = true; for (int j = 0; j < subSeq.length; j++) { if (origin[i + j] != subSeq[j]) { match = false; break; } } if (match) return true; } return false; } Iterable<ZModemEvent> receive(Uint8List data) sync* { if (_findSubSeq(data, ZModemAbortSequence.abortSequence)) { yield ZSessionAbortedEvent(); } // other code .... }
No branches or pull requests
sz一个无权限的文件后,再输入其他字符时,显示有点异常。比如说我输入了5个字符,终端页面只会展示2个。
The text was updated successfully, but these errors were encountered: