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

panic Utf8Error #319

Open
lunxinfeng opened this issue Jun 5, 2024 · 0 comments
Open

panic Utf8Error #319

lunxinfeng opened this issue Jun 5, 2024 · 0 comments
Labels

Comments

@lunxinfeng
Copy link

lunxinfeng commented Jun 5, 2024

Thank you for this library, but I found a problem. I have a non-utf8 encoded file on my server. When I access the server path on the Windows platform, it panics.

called Result::unwrap() on an Err value: Utf8Error { valid_up_to: 10, error_len: Some(1) }

sftp.readdir(&Path::new("/usr/xxxx/"));
#[cfg(windows)]
fn mkpath(v: Vec<u8>) -> PathBuf {
    use std::str;
    PathBuf::from(str::from_utf8(&v).unwrap())
}
@yodaldevoid yodaldevoid added the bug label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants