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

bugfix: Don't use canonicalized strings on Windows #218

Merged
merged 1 commit into from
Aug 15, 2022
Merged

bugfix: Don't use canonicalized strings on Windows #218

merged 1 commit into from
Aug 15, 2022

Conversation

JurajSadel
Copy link
Contributor

closes #209

@MabezDev
Copy link
Member

MabezDev commented Aug 15, 2022

Just passing by, I don't understand the full issue, but could it be the to_string_lossy that's the real issue? find_serial_port should probably take a PathBuf, not a String?

@MabezDev
Copy link
Member

Just passing by, I don't understand the full issue, but could it be the to_string_lossy that's the real issue? find_serial_port should probably take a PathBuf, not a String?

We looked into this, it seems canonicalize doesn't work with "dummy" device paths like COM4 for example, hence this error. Therefore this change is correct.

@@ -22,9 +22,13 @@ pub fn get_serial_port_info(
let ports = detect_usb_serial_ports().unwrap_or_default();

if let Some(serial) = &matches.serial {
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind adding a comment explaining this please? There are a couple things going on here and it isn't immediately clear to others what the motivation for this is:

@jessebraham jessebraham merged commit 3c21364 into esp-rs:master Aug 15, 2022
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.

"The parameter is incorrect" error when flashing from windows
3 participants