-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
sort: --files0-from should not panic when invalid utf-8 #9692
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
base: main
Are you sure you want to change the base?
Conversation
140a726 to
e1837a0
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
57f5452 to
1c0f20e
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
| let non_utf8_path = at.plus_as_string("").to_owned() + "/"; | ||
| let full_path = Path::new(&non_utf8_path).join(non_utf8_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm missing something, I think you can simplify it and use plus. And as a side effect it would also fix the clippy warning that's shown for line 1562.
| let non_utf8_path = at.plus_as_string("").to_owned() + "/"; | |
| let full_path = Path::new(&non_utf8_path).join(non_utf8_name); | |
| let full_path = at.plus(non_utf8_name); |
| at.append("file2.txt", "apple\n"); | ||
|
|
||
| // Create a file with non-UTF-8 bytes in filename | ||
| let non_utf8_name = OsStr::from_bytes(b"\xff\xfefile3.txt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if you have seen it: the spell checker complains about "xfefile" ;-)
No description provided.