Skip to content
New issue

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

Fixed the problem that packet id: "FAIL" was returned when UTF8 characters appeared in the "path" parameter of the "push" method. #71

Merged
merged 4 commits into from
Sep 6, 2024

Conversation

flyfishxu
Copy link
Contributor

In the period version, "java.io.IOException: Unexpected sync packet id: FAIL" was thrown when UTF8 characters appeared in the path parameter of the push method.
Screenshot 2024-01-22 18 48 16
Screenshot 2024-01-22 17 44 20

Because characters other than ASCII do not occupy only one byte in UTF8 encoding, so using the "remote.length" method to calculate the byte length will result in an incorrect length result, resulting in a "FAIL".

…d: FAIL" was thrown when UTF8 characters appeared in the path parameter of the push method.
@bartekpacia
Copy link
Member

Hey @flyfishxu, could you add a test for this?

@flyfishxu
Copy link
Contributor Author

No problem @bartekpacia ! I added a test for this problem, and when I write the test, I found that if CJK caracters appear in the path or filename, it will back "No such file or directory". Actually, they are by the same cause, and I fixed them now.

Copy link
Member

@bartekpacia bartekpacia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test!

I verified that the test fails on current master branch, but passes here. Good job.

Will merge with master to make sure it's all right.

@bartekpacia bartekpacia merged commit da3d0fb into mobile-dev-inc:master Sep 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants